diff options
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | libgcompat/pthread.c | 7 |
2 files changed, 8 insertions, 0 deletions
@@ -5,6 +5,7 @@ LIBGCOMPAT_SRC = \ libgcompat/gnulib.c \ libgcompat/malloc.c \ libgcompat/math.c \ + libgcompat/pthread.c \ libgcompat/resource.c \ libgcompat/setjmp.c \ libgcompat/stdio.c \ diff --git a/libgcompat/pthread.c b/libgcompat/pthread.c new file mode 100644 index 0000000..9d061e9 --- /dev/null +++ b/libgcompat/pthread.c @@ -0,0 +1,7 @@ +#include <pthread.h> + +int __register_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void)) { + return pthread_atfork(prepare, parent, child); +} + +int register_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void)) __attribute__ ((weak, alias("__register_atfork"))); |