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.

37 lines
605 B

5 years ago
  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. #define unveil(path, permissions) 0
  10. #ifndef HAVE_GETENTROPY
  11. int getentropy(void *buf, size_t buflen);
  12. #endif
  13. #include <grp.h>
  14. #ifndef HAVE_CLOSEFROM
  15. int closefrom(int fd);
  16. #endif
  17. #ifndef HAVE_SETGROUPS
  18. int setgroups(int ngroups, const gid_t *gidset);
  19. #endif
  20. #ifndef HAVE_SETRESGID
  21. int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
  22. #endif
  23. #ifndef HAVE_SETRESUID
  24. int setresuid(uid_t ruid, uid_t euid, uid_t suid);
  25. #endif
  26. #endif