]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Don't redefine the byte swap macros if already defined 12388/head
authorMark Andrews <marka@isc.org>
Sun, 12 Jul 2026 23:36:38 +0000 (09:36 +1000)
committerMark Andrews <marka@isc.org>
Tue, 14 Jul 2026 21:14:25 +0000 (07:14 +1000)
lib/isc/include/isc/endian.h

index 153fa00f4111c50b93dde431174f81111bc843f3..a39533921b8236453b554211c0befe53c8d30086 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <libkern/OSByteOrder.h>
 
+#ifndef htobe16
 #define htobe16(x) OSSwapHostToBigInt16(x)
 #define htole16(x) OSSwapHostToLittleInt16(x)
 #define be16toh(x) OSSwapBigToHostInt16(x)
@@ -53,6 +54,7 @@
 #define htole64(x) OSSwapHostToLittleInt64(x)
 #define be64toh(x) OSSwapBigToHostInt64(x)
 #define le64toh(x) OSSwapLittleToHostInt64(x)
+#endif /* !htobe16 */
 
 #elif defined(sun) || defined(__sun) || defined(__SVR4)