Skip to content

Commit

Permalink
Land #1130 - add endianness functions for apple
Browse files Browse the repository at this point in the history
  • Loading branch information
botovq committed Dec 26, 2024
2 parents 6debfc0 + 5626ce4 commit 2cb875e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/compat/endian.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
#endif
#endif

#if defined(__APPLE__) && !defined(HAVE_ENDIAN_H)
#if defined(__APPLE__)
#include <libkern/OSByteOrder.h>
#define be16toh(x) OSSwapBigToHostInt16((x))
#define htobe16(x) OSSwapHostToBigInt16((x))
Expand All @@ -74,7 +74,7 @@
#define htobe64(x) OSSwapHostToBigInt64(x)
#define le64toh(x) OSSwapLittleToHostInt64(x)
#define be64toh(x) OSSwapBigToHostInt64(x)
#endif /* __APPLE__ && !HAVE_ENDIAN_H */
#endif /* __APPLE__ */

#if defined(_WIN32) && !defined(HAVE_ENDIAN_H)
#include <winsock2.h>
Expand Down

0 comments on commit 2cb875e

Please sign in to comment.