Skip to content
Snippets Groups Projects
Commit 2c2a9afa authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

Make byteorder conv functions compile on OS X.

refs #1558
parent 338be5a5
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,14 @@
# define be16toh(x) betoh16(x)
# define be32toh(x) betoh32(x)
# define be64toh(x) betoh64(x)
#elif defined(__APPLE__)
# include <libkern/OSByteOrder.h>
# define be16toh(x) OSSwapBigToHostInt16(x)
# define be32toh(x) OSSwapBigToHostInt32(x)
# define be64toh(x) OSSwapBigToHostInt64(x)
# define htobe16(x) OSSwapHostToBigInt16(x)
# define htobe32(x) OSSwapHostToBigInt32(x)
# define htobe64(x) OSSwapHostToBigInt64(x)
#endif
#endif /* _KNOT_ENDIAN_H_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment