Backported from:
commit
e2a195a6849 ("Fix warnings on FreeBSD")
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I12aa474cd057645337f03de22d7c6010266398f3
#include <signal.h>
#include <sched.h>
#include <stdarg.h>
+#include <stdlib.h>
#include <errno.h>
#include <lttng/ust.h>
pid_t rfork(int flags)
{
- static pid_t (*plibc_func)(void) = NULL;
+ static pid_t (*plibc_func)(int flags) = NULL;
sigset_t sigset;
pid_t retval;
int saved_errno;
ust_before_fork(&sigset);
/* Do the real rfork */
- retval = plibc_func();
+ retval = plibc_func(flags);
saved_errno = errno;
if (retval == 0) {
/* child */