diff options
author | Theo Buehler <tb@openbsd.org> | 2024-12-26 16:25:54 +0100 |
---|---|---|
committer | Theo Buehler <tb@openbsd.org> | 2024-12-26 16:25:54 +0100 |
commit | 2cb875ecbc02421afa78180478f57d848ac8f4bc (patch) | |
tree | 3a0b82b0653a4e4281ab0bd1f793ddfd20ac1729 | |
parent | 6debfc0a84262849e1303ae1b4fd2ea25476460a (diff) | |
parent | 5626ce43e30e936e870c123b4ac80e469de4d9b9 (diff) | |
download | portable-2cb875ecbc02421afa78180478f57d848ac8f4bc.tar.gz portable-2cb875ecbc02421afa78180478f57d848ac8f4bc.tar.bz2 portable-2cb875ecbc02421afa78180478f57d848ac8f4bc.zip |
Land #1130 - add endianness functions for apple
-rw-r--r-- | include/compat/endian.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/compat/endian.h b/include/compat/endian.h index 2e4c8f7..af3664d 100644 --- a/include/compat/endian.h +++ b/include/compat/endian.h | |||
@@ -62,7 +62,7 @@ | |||
62 | #endif | 62 | #endif |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | #if defined(__APPLE__) && !defined(HAVE_ENDIAN_H) | 65 | #if defined(__APPLE__) |
66 | #include <libkern/OSByteOrder.h> | 66 | #include <libkern/OSByteOrder.h> |
67 | #define be16toh(x) OSSwapBigToHostInt16((x)) | 67 | #define be16toh(x) OSSwapBigToHostInt16((x)) |
68 | #define htobe16(x) OSSwapHostToBigInt16((x)) | 68 | #define htobe16(x) OSSwapHostToBigInt16((x)) |
@@ -74,7 +74,7 @@ | |||
74 | #define htobe64(x) OSSwapHostToBigInt64(x) | 74 | #define htobe64(x) OSSwapHostToBigInt64(x) |
75 | #define le64toh(x) OSSwapLittleToHostInt64(x) | 75 | #define le64toh(x) OSSwapLittleToHostInt64(x) |
76 | #define be64toh(x) OSSwapBigToHostInt64(x) | 76 | #define be64toh(x) OSSwapBigToHostInt64(x) |
77 | #endif /* __APPLE__ && !HAVE_ENDIAN_H */ | 77 | #endif /* __APPLE__ */ |
78 | 78 | ||
79 | #if defined(_WIN32) && !defined(HAVE_ENDIAN_H) | 79 | #if defined(_WIN32) && !defined(HAVE_ENDIAN_H) |
80 | #include <winsock2.h> | 80 | #include <winsock2.h> |