patch-lib_byteorder64_h 653 B

123456789101112131415161718192021222324
  1. $OpenBSD: patch-lib_byteorder64_h,v 1.1 2015/03/15 08:51:07 ajacoutot Exp $
  2. XXX push upstream
  3. --- lib/byteorder64.h.orig Thu Mar 12 14:31:31 2015
  4. +++ lib/byteorder64.h Thu Mar 12 14:31:57 2015
  5. @@ -47,15 +47,10 @@
  6. /* http://stackoverflow.com/a/4410728/94253 */
  7. -#if defined(__linux__)
  8. +#if defined(__linux__) || defined(__OpenBSD__)
  9. # include <endian.h>
  10. #elif defined(__FreeBSD__) || defined(__NetBSD__)
  11. # include <sys/endian.h>
  12. -#elif defined(__OpenBSD__)
  13. -# include <sys/types.h>
  14. -# define be16toh(x) betoh16(x)
  15. -# define be32toh(x) betoh32(x)
  16. -# define be64toh(x) betoh64(x)
  17. #endif
  18. /* 64-bit host/network byte-order swap macros */