[PATCH] Fix bb_setpgrp weapper on the FreeBSD

Alex Samorukov samm at os2.kiev.ua
Mon Jan 4 00:33:32 UTC 2021


FreeBSD uses setpgrp(pid_t, pid_t)
This patch makes crond.c and probably others compilable

Signed-off-by: Alex Samorukov <samm at os2.kiev.ua>
---
 include/platform.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/platform.h b/include/platform.h
index 085387fd8..a96de5c9e 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -319,7 +319,7 @@ typedef unsigned smalluint;
 #endif
 
 /* Define bb_setpgrp */
-#if defined(__digital__) && defined(__unix__)
+#if (defined(__digital__) && defined(__unix__) || defined(__FreeBSD__))
 /* use legacy setpgrp(pid_t, pid_t) for now.  move to platform.c */
 # define bb_setpgrp() do { pid_t __me = getpid(); setpgrp(__me, __me); } while (0)
 #else
-- 
2.29.1



More information about the busybox mailing list