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.

49 lines
904 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_FREEZERO
  21. void freezero(void *ptr, size_t sz);
  22. #endif
  23. #ifndef HAVE_REALLOCARRAY
  24. void *reallocarray(void *, size_t, size_t);
  25. #endif
  26. #ifndef HAVE_RECALLOCARRAY
  27. void *recallocarray(void *, size_t, size_t, size_t);
  28. #endif
  29. #ifndef HAVE_SETPROCTITLE
  30. void compat_init_setproctitle(int argc, char *argv[]);
  31. void setproctitle(const char *fmt, ...);
  32. #endif
  33. #ifndef HAVE_STRTONUM
  34. long long strtonum(const char *nptr, long long minval,
  35. long long maxval, const char **errstr);
  36. #endif
  37. #endif