From: Marius S. <li...@sc...> - 2025-04-27 18:57:09
|
This morning my FreeBSD Poudriere build system updated SSHGuard to version 2.5.0. When I attempted to update the MacPorts Portfile (I’m the maintainer), I got the following build error: ../common/sandbox.c:43:9: error: call to undeclared function 'setresgid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 43 | if (setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) == -1) { | ^ ../common/sandbox.c:43:9: note: did you mean 'setregid'? /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/unistd.h:593:6: note: 'setregid' declared here 593 | int setregid(gid_t, gid_t) __DARWIN_ALIAS(setregid); | ^ ../common/sandbox.c:46:9: error: call to undeclared function 'setresuid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 46 | if (setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid) == -1) { | ^ 2 errors generated. make[2]: *** [sandbox.o] Error 1 There is no “setresgid" function in macOS. It should be defined in <unistd.h>, but doesn’t appear there. It appears to be a GNU/Linux function (which FreeBSD also implements). Marius -- Marius Schamschula |