Skip to content

Commit

Permalink
fix:1.10.25, 修改backtrace.cpp,摒弃采用__GLIBC__来判定是否有execinfo.h的方法
Browse files Browse the repository at this point in the history
  • Loading branch information
hevake committed Nov 10, 2024
1 parent ca1bfbd commit 4b66a71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
10 changes: 3 additions & 7 deletions modules/base/backtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,11 @@
#include "backtrace.h"

/**
* 目前只有glibc支持execinfo.h,其它库如uclibc是没有支持。为避免编译出错,在此区别处理
* 如果外面没有指定HAVE_EXECINFO_H,则根据是否采用glibc库自动处理
* 目前只有glibc支持execinfo.h,其它库如uclibc是没有支持。
* 为避免编译出错,可以在外部将 HAVE_EXECINFO_H 指定为0
*/
#ifndef HAVE_EXECINFO_H
# ifdef __GLIBC__
# define HAVE_EXECINFO_H 1
# else
# define HAVE_EXECINFO_H 0
# endif //__GLIBC__
# define HAVE_EXECINFO_H 1 //! 如果是uclibc,请改成0
#endif //HAVE_EXECINFO_H

#if HAVE_EXECINFO_H
Expand Down
1 change: 0 additions & 1 deletion modules/main/error_signals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* of the source tree.
*/
#include <signal.h>
#include <execinfo.h>

#include <cstring>
#include <iostream>
Expand Down
2 changes: 1 addition & 1 deletion version.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# TBOX版本号
TBOX_VERSION_MAJOR := 1
TBOX_VERSION_MINOR := 10
TBOX_VERSION_REVISION := 24
TBOX_VERSION_REVISION := 25

0 comments on commit 4b66a71

Please sign in to comment.