From b5187a0aff55fa937048adb58da0f15c03ead837 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 25 Mar 2019 16:37:34 -0400 Subject: [PATCH] only use __register_atfork hack for old glibc --- h_malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/h_malloc.c b/h_malloc.c index bb571e4..ed632bd 100644 --- a/h_malloc.c +++ b/h_malloc.c @@ -22,7 +22,7 @@ #include "util.h" // 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 int __register_atfork(void (*)(void), void (*)(void), void (*)(void), void *); #define atfork(prepare, parent, child) __register_atfork(prepare, parent, child, __dso_handle)