aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/include/endian.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/include/endian.h b/tools/include/endian.h
index bba70abd83..e2ac755667 100644
--- a/tools/include/endian.h
+++ b/tools/include/endian.h
@@ -5,11 +5,11 @@
#include <byteswap.h>
#include_next <endian.h>
#elif defined(__APPLE__)
-#include <machine/endian.h>
-#include <machine/byte_order.h>
-#define bswap_16(x) NXSwapShort(x)
-#define bswap_32(x) NXSwapInt(x)
-#define bswap_64(x) NXSwapLongLong(x)
+#include <netinet/in.h>
+#include <libkern/OSByteOrder.h>
+#define bswap_16(x) OSSwapInt16(x)
+#define bswap_32(x) OSSwapInt32(x)
+#define bswap_64(x) OSSwapInt64(x)
#elif defined(__FreeBSD__)
#include <sys/endian.h>
#define bswap_16(x) bswap16(x)