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
814 B

  1. /*
  2. * Public domain
  3. * sys/types.h compatibility shim
  4. */
  5. #include_next <sys/types.h>
  6. #ifndef LIBCOMPAT_SYS_TYPES_H
  7. #define LIBCOMPAT_SYS_TYPES_H
  8. #include <stdint.h>
  9. #ifdef __MINGW32__
  10. #include <_bsd_types.h>
  11. #endif
  12. #if !defined(HAVE_ATTRIBUTE__DEAD) && !defined(__dead)
  13. #define __dead __attribute__((__noreturn__))
  14. #endif
  15. #if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__bounded__)
  16. # define __bounded__(x, y, z)
  17. #endif
  18. #if !defined(HAVE_ATTRIBUTE__PACKED) && !defined(__packed)
  19. # define __packed __attribute__((__packed__))
  20. #endif
  21. /*
  22. * Define BSD-style unsigned bits types for systems that do not have them.
  23. */
  24. typedef uint8_t u_int8_t;
  25. typedef uint16_t u_int16_t;
  26. typedef uint32_t u_int32_t;
  27. typedef uint64_t u_int64_t;
  28. #ifndef BYTE_ORDER
  29. #include <machine/endian.h>
  30. #endif
  31. #endif