From 78ba749bcb8e63cbe69b59831436d28562d27b88 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 12 Sep 2023 12:11:06 +0000 Subject: Add waitid() sysdep, and fuck OpenBSD Signed-off-by: Laurent Bercot --- src/libstddjb/cspawn.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/libstddjb') diff --git a/src/libstddjb/cspawn.c b/src/libstddjb/cspawn.c index cb89481..ea0da90 100644 --- a/src/libstddjb/cspawn.c +++ b/src/libstddjb/cspawn.c @@ -96,7 +96,12 @@ static inline pid_t cspawn_fork (char const *prog, char const *const *argv, char return pid ; } -#ifdef SKALIBS_HASPOSIXSPAWN + /* + guess who has a buggy posix_spawn() *and* doesn't have waitid() to work around it? + if you guessed OpenBSD, you're right! + */ + +#if defined(SKALIBS_HASPOSIXSPAWN) && (!defined(SKALIBS_HASPOSIXSPAWNEARLYRETURN) || defined(SKALIBS_HASWAITID)) #include #include -- cgit v1.2.3