cheaders: use backtrace* stubs for both android & musl

pull/4906/head
Delyan Angelov 2020-05-15 15:37:19 +03:00
parent 2c93deb884
commit e18268e2f4
1 changed files with 5 additions and 6 deletions

View File

@ -71,16 +71,15 @@ typedef int (*qsort_callback_func)(const void*, const void*);
#define _MOV std::move
#endif
#if defined(__ANDROID__)
int backtrace (void **__array, int __size) { return 0; }
char **backtrace_symbols (void *const *__array, int __size){ return 0; }
void backtrace_symbols_fd (void *const *__array, int __size, int __fd){}
#else
#ifndef _WIN32
#if defined __has_include
#if __has_include (<execinfo.h>)
# include <execinfo.h>
#endif
#else
// Most probably musl OR __ANDROID__ ...
int backtrace (void **__array, int __size) { return 0; }
char **backtrace_symbols (void *const *__array, int __size){ return 0; }
void backtrace_symbols_fd (void *const *__array, int __size, int __fd){}
#endif
#endif
#endif