From: Mathieu Desnoyers Date: Sat, 12 Aug 2023 17:19:52 +0000 (-0400) Subject: Fix: FreeBSD: Pass flags arguments to rfork wrapper X-Git-Tag: v2.12.9~5 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;ds=sidebyside;h=b115a3fc6eefd727eec5874fa3dc346045183189;p=lttng-ust.git Fix: FreeBSD: Pass flags arguments to rfork wrapper Backported from: commit e2a195a6849 ("Fix warnings on FreeBSD") Signed-off-by: Mathieu Desnoyers Change-Id: I12aa474cd057645337f03de22d7c6010266398f3 --- diff --git a/liblttng-ust-fork/ustfork.c b/liblttng-ust-fork/ustfork.c index 983ed04f..fc83d05c 100644 --- a/liblttng-ust-fork/ustfork.c +++ b/liblttng-ust-fork/ustfork.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -414,7 +415,7 @@ int setresgid(gid_t rgid, gid_t egid, gid_t sgid) 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; @@ -430,7 +431,7 @@ pid_t rfork(int flags) ust_before_fork(&sigset); /* Do the real rfork */ - retval = plibc_func(); + retval = plibc_func(flags); saved_errno = errno; if (retval == 0) { /* child */