Improve linux-compat/execinfo.h so it can be used multiple times

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-12-04 20:25:43 +00:00
parent 5ec5688d62
commit c269d7228a
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0

View file

@ -17,19 +17,25 @@
#pragma once
#define pthread_setname_np(...)
#include <pthread.h>
int pthread_getcpuclockid(pthread_t, clockid_t* const clock_id)
static inline
int pthread_getcpuclockid_custom(pthread_t, clockid_t* const clock_id)
{
*clock_id = CLOCK_REALTIME;
return 0;
}
static int backtrace(void**, int)
#define pthread_getcpuclockid pthread_getcpuclockid_custom
#define pthread_setname_np(...)
static inline
int backtrace(void**, int)
{
return 0;
}
static inline
char** backtrace_symbols(void* const*, int)
{
return nullptr;