Portable build framework for OpenNTPD
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
568 B

  1. /*
  2. * Public domain
  3. * unistd.h compatibility shim
  4. */
  5. #include_next <unistd.h>
  6. #ifndef LIBCOMPAT_UNISTD_H
  7. #define LIBCOMPAT_UNISTD_H
  8. #define pledge(request, paths) 0
  9. #ifndef HAVE_GETENTROPY
  10. int getentropy(void *buf, size_t buflen);
  11. #endif
  12. #include <grp.h>
  13. #ifndef HAVE_CLOSEFROM
  14. int closefrom(int fd);
  15. #endif
  16. #ifndef HAVE_SETGROUPS
  17. int setgroups(int ngroups, const gid_t *gidset);
  18. #endif
  19. #ifndef HAVE_SETRESGID
  20. int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
  21. #endif
  22. #ifndef HAVE_SETRESUID
  23. int setresuid(uid_t ruid, uid_t euid, uid_t suid);
  24. #endif
  25. #endif