Fix bb_setpgrp weapper on the FreeBSD

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

Signed-off-by: Alex Samorukov <samm@os2.kiev.ua>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Alex Samorukov 2021-01-04 01:33:32 +01:00 committed by Denys Vlasenko
parent 0544933501
commit d4624d3468

View File

@ -319,7 +319,7 @@ typedef unsigned smalluint;
#endif #endif
/* Define bb_setpgrp */ /* 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 */ /* 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) # define bb_setpgrp() do { pid_t __me = getpid(); setpgrp(__me, __me); } while (0)
#else #else