Skip to content

Commit 8c6081a

Browse files
committed
compat: remove bswap_* check on macOS
This was originally added in #9366 to fix the gui build, as Protobuf would also define these macros. Now that we're no-longer using Protobuf, remove the additional check.
1 parent 2cba35a commit 8c6081a

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/compat/byteswap.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,13 @@
1717

1818
#if defined(MAC_OSX)
1919

20-
#if !defined(bswap_16)
21-
22-
// Mac OS X / Darwin features; we include a check for bswap_16 because if it is already defined, protobuf has
23-
// defined these macros for us already; if it isn't, we do it ourselves. In either case, we get the exact same
24-
// result regardless which path was taken
2520
#include <libkern/OSByteOrder.h>
2621
#define bswap_16(x) OSSwapInt16(x)
2722
#define bswap_32(x) OSSwapInt32(x)
2823
#define bswap_64(x) OSSwapInt64(x)
2924

30-
#endif // !defined(bswap_16)
31-
3225
#else
33-
// Non-Mac OS X / non-Darwin
26+
// Non-MacOS / non-Darwin
3427

3528
#if HAVE_DECL_BSWAP_16 == 0
3629
inline uint16_t bswap_16(uint16_t x)

0 commit comments

Comments
 (0)