From 43977f09b303d24d85d61c6d195f4517f6c5ecef Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 14 Jun 2017 20:23:45 +0000 Subject: pthread: add __register_atfork() stub --- Makefile | 1 + libgcompat/pthread.c | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 libgcompat/pthread.c diff --git a/Makefile b/Makefile index 5d18d84..b6e497a 100644 --- a/Makefile +++ b/Makefile @@ -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 + +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"))); -- cgit v1.2.3-60-g2f50