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.

41 lines
749 B

  1. /*
  2. * stdlib.h compatibility shim
  3. * Public domain
  4. */
  5. #include_next <stdlib.h>
  6. #ifndef LIBCOMPAT_STDLIB_H
  7. #define LIBCOMPAT_STDLIB_H
  8. #include <sys/stat.h>
  9. #include <sys/time.h>
  10. #include <stdint.h>
  11. #ifndef HAVE_ARC4RANDOM_
  12. uint32_t arc4random(void);
  13. #endif
  14. #ifndef HAVE_ARC4RANDOM_UNIFORM
  15. uint32_t arc4random_uniform(uint32_t);
  16. #endif
  17. #ifndef HAVE_DAEMON
  18. int daemon(int nochdir, int noclose);
  19. #endif
  20. #ifndef HAVE_REALLOCARRAY
  21. void *reallocarray(void *, size_t, size_t);
  22. #endif
  23. #ifndef HAVE_SETPROCTITLE
  24. void compat_init_setproctitle(int argc, char *argv[]);
  25. void setproctitle(const char *fmt, ...);
  26. #endif
  27. #ifndef HAVE_STRTONUM
  28. long long strtonum(const char *nptr, long long minval,
  29. long long maxval, const char **errstr);
  30. #endif
  31. #endif