diff options
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/openbsd-compat.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index d1d8652..bee126c 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #if defined(__APPLE__) && !defined(HAVE_ENDIAN_H) | 18 | #if defined(__APPLE__) && !defined(HAVE_ENDIAN_H) |
19 | #include <libkern/OSByteOrder.h> | 19 | #include <libkern/OSByteOrder.h> |
20 | #define be16toh(x) OSSwapBigToHostInt16((x)) | 20 | #define be16toh(x) OSSwapBigToHostInt16((x)) |
21 | #define htobe16(x) OSSwapHostToBigInt16((x)) | ||
21 | #define be32toh(x) OSSwapBigToHostInt32((x)) | 22 | #define be32toh(x) OSSwapBigToHostInt32((x)) |
22 | #endif /* __APPLE__ && !HAVE_ENDIAN_H */ | 23 | #endif /* __APPLE__ && !HAVE_ENDIAN_H */ |
23 | 24 | ||
@@ -27,6 +28,7 @@ | |||
27 | #include <sys/param.h> | 28 | #include <sys/param.h> |
28 | #endif | 29 | #endif |
29 | #define be16toh(x) ntohs((x)) | 30 | #define be16toh(x) ntohs((x)) |
31 | #define htobe16(x) htons((x)) | ||
30 | #define be32toh(x) ntohl((x)) | 32 | #define be32toh(x) ntohl((x)) |
31 | #endif /* _WIN32 && !HAVE_ENDIAN_H */ | 33 | #endif /* _WIN32 && !HAVE_ENDIAN_H */ |
32 | 34 | ||