diff options
author | William Pitcock <nenolod@dereferenced.org> | 2017-06-14 20:23:45 +0000 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2017-06-14 20:23:45 +0000 |
commit | 43977f09b303d24d85d61c6d195f4517f6c5ecef (patch) | |
tree | 0bd2d8d43e2f65eece4400de14b3b4defbfb0bde | |
parent | 2d5a4c1c2f160534cd59ec9bd0504219263116e3 (diff) | |
download | gcompat-43977f09b303d24d85d61c6d195f4517f6c5ecef.tar.gz gcompat-43977f09b303d24d85d61c6d195f4517f6c5ecef.tar.bz2 gcompat-43977f09b303d24d85d61c6d195f4517f6c5ecef.tar.xz gcompat-43977f09b303d24d85d61c6d195f4517f6c5ecef.zip |
pthread: add __register_atfork() stub
-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"))); |