Skip to content

Commit

Permalink
Add in missing endianess functions for Apple targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Lowell Palmer committed Dec 20, 2024
1 parent 1005119 commit 5626ce4
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 5626ce4

Please sign in to comment.