summaryrefslogtreecommitdiff
path: root/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'fork.c')
-rw-r--r--fork.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/fork.c b/fork.c
index 0d62226..aa621f2 100644
--- a/fork.c
+++ b/fork.c
@@ -27,7 +27,8 @@ pthread_atfork(void (*prepare)(void),
/* Push prepare. */
if (_pthread_handler_push(_PTHREAD_FORKPREPARE_STACK,
_PTHREAD_HANDLER_POP_FIFO,
- (void (*prepare)(void *)), NULL) == ENOMEM)
+ prepare,
+ NULL) == ENOMEM)
{
ret = ENOMEM;
}
@@ -39,7 +40,8 @@ pthread_atfork(void (*prepare)(void),
/* Push parent. */
if (_pthread_handler_push(_PTHREAD_FORKPARENT_STACK,
_PTHREAD_HANDLER_POP_LIFO,
- (void (*parent)(void *)), NULL) == ENOMEM)
+ parent,
+ NULL) == ENOMEM)
{
ret = ENOMEM;
}
@@ -51,7 +53,8 @@ pthread_atfork(void (*prepare)(void),
/* Push child. */
if (_pthread_handler_push(_PTHREAD_FORKCHILD_STACK,
_PTHREAD_HANDLER_POP_LIFO,
- (void (*child)(void *)), arg) == ENOMEM)
+ child,
+ NULL) == ENOMEM)
{
ret = ENOMEM;
}
@@ -129,6 +132,7 @@ fork()
}
/* Not reached. */
+ return 0;
}
#endif /* HAVE_PID_T && HAVE_FORK */