mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-04-20 06:20:20 +02:00
only use __register_atfork hack for old glibc
This commit is contained in:
parent
494cc5ec50
commit
b5187a0aff
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
// use __register_atfork directly to avoid linking with libpthread for glibc < 2.28
|
// use __register_atfork directly to avoid linking with libpthread for glibc < 2.28
|
||||||
#ifdef __GLIBC__
|
#if defined(__GLIBC__) && !__GLIBC_PREREQ(2, 28)
|
||||||
extern void *__dso_handle;
|
extern void *__dso_handle;
|
||||||
extern int __register_atfork(void (*)(void), void (*)(void), void (*)(void), void *);
|
extern int __register_atfork(void (*)(void), void (*)(void), void (*)(void), void *);
|
||||||
#define atfork(prepare, parent, child) __register_atfork(prepare, parent, child, __dso_handle)
|
#define atfork(prepare, parent, child) __register_atfork(prepare, parent, child, __dso_handle)
|
||||||
|
|
Loading…
Add table
Reference in a new issue