1 /* 2 * Public domain 3 * unistd.h compatibility shim 4 */ 5 6 #include_next <unistd.h> 7 8 #ifndef LIBCOMPAT_UNISTD_H 9 #define LIBCOMPAT_UNISTD_H 10 11 #ifndef HAVE_PIPE2 12 int pipe2(int [2], int); 13 #endif 14 15 #ifndef HAVE_PLEDGE 16 #define pledge(request, paths) 0 17 #endif 18 19 #ifndef HAVE_UNVEIL 20 #define unveil(path, permissions) 0 21 #endif 22 23 #include <grp.h> 24 25 #ifndef HAVE_SETGROUPS 26 int setgroups(int ngroups, const gid_t *gidset); 27 #endif 28 29 #ifndef HAVE_SETRESGID 30 int setresgid(gid_t rgid, gid_t egid, gid_t sgid); 31 #endif 32 33 #ifndef HAVE_SETRESUID 34 int setresuid(uid_t ruid, uid_t euid, uid_t suid); 35 #endif 36 37 #endif 38