Browse Source

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

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.12
falkTX 3 years ago
parent
commit
c269d7228a
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 9 additions and 3 deletions
  1. +9
    -3
      include/linux-compat/execinfo.h

+ 9
- 3
include/linux-compat/execinfo.h 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;


Loading…
Cancel
Save