X-Git-Url: http://git.silcnet.org/gitweb/?p=runtime.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Fstacktrace.h;h=ef4db5d80ca468601b6327ad7e8a980ebcc37372;hp=bfe8ae035e34badbcb7ed1de5b74f363aba705ce;hb=adf03e69c4e96ffdac88e7cfe9c2b4583166eb6e;hpb=2ede5da9520e7e8508ae28656d542824c4c29793 diff --git a/lib/silcutil/stacktrace.h b/lib/silcutil/stacktrace.h index bfe8ae03..ef4db5d8 100644 --- a/lib/silcutil/stacktrace.h +++ b/lib/silcutil/stacktrace.h @@ -24,7 +24,7 @@ #error "Do not include internal header file directly" #endif -#if defined(__GNUC__) && defined(__i386__) +#if defined(__GNUC__) && defined(HAVE_EXECINFO_H) && defined(HAVE_BACKTRACE) #undef strdup #define silc_malloc(s) silc_st_malloc((s), __FILE__, __LINE__) @@ -32,6 +32,7 @@ #define silc_realloc(p, s) silc_st_realloc((p), (s), __FILE__, __LINE__) #define silc_free(p) silc_st_free((p), __FILE__, __LINE__) #define silc_memdup(p, s) silc_st_memdup((p), (s), __FILE__, __LINE__) +#define silc_strdup(s) silc_st_strdup((s), __FILE__, __LINE__) #define strdup(s) silc_st_strdup((s), __FILE__, __LINE__) void *silc_st_malloc(size_t size, const char *file, int line); @@ -44,6 +45,6 @@ void silc_st_dump(void); #else #error "memory allocation stack trace not supported on this platform" -#endif /* __GNUC__ && __i386__ */ +#endif /* __GNUC__ && HAVE_EXECINFO_H && HAVE_BACKTRACE */ #endif /* STACKTRACE_H */