diff options
Diffstat (limited to 'src/thread/sem_open.c')
-rw-r--r-- | src/thread/sem_open.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/thread/sem_open.c b/src/thread/sem_open.c index 6fb0c5b2..0ad29de9 100644 --- a/src/thread/sem_open.c +++ b/src/thread/sem_open.c @@ -12,6 +12,12 @@ #include <stdlib.h> #include <pthread.h> #include "lock.h" +#include "fork_impl.h" + +#define malloc __libc_malloc +#define calloc __libc_calloc +#define realloc undef +#define free undef static struct { ino_t ino; @@ -19,6 +25,7 @@ static struct { int refcnt; } *semtab; static volatile int lock[1]; +volatile int *const __sem_open_lockptr = lock; #define FLAGS (O_RDWR|O_NOFOLLOW|O_CLOEXEC|O_NONBLOCK) |