1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cheaders: use backtrace* stubs for both android & musl

This commit is contained in:
Delyan Angelov 2020-05-15 15:37:19 +03:00
parent 2c93deb884
commit e18268e2f4

View File

@ -71,16 +71,15 @@ typedef int (*qsort_callback_func)(const void*, const void*);
#define _MOV std::move #define _MOV std::move
#endif #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 #ifndef _WIN32
#if defined __has_include #if defined __has_include
#if __has_include (<execinfo.h>) #if __has_include (<execinfo.h>)
# 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 #endif
#endif #endif