From b115a3fc6eefd727eec5874fa3dc346045183189 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Sat, 12 Aug 2023 13:19:52 -0400 Subject: [PATCH] Fix: FreeBSD: Pass flags arguments to rfork wrapper Backported from: commit e2a195a6849 ("Fix warnings on FreeBSD") Signed-off-by: Mathieu Desnoyers Change-Id: I12aa474cd057645337f03de22d7c6010266398f3 --- liblttng-ust-fork/ustfork.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 */ -- 2.34.1