Explorar o código

Fix FreeBSD endian checks

FreeBSD, like OpenBSD, uses BIG_ENDIAN, LITTLE_ENDIAN, and BYTE_ORDER,
whereas Linux and compatibles use __-prefixed names.  Define the names
the same as the OpenBSD block below it.
Justin Hibbits %!s(int64=7) %!d(string=hai) anos
pai
achega
f29aa23b54
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      include/compiler.h

+ 3 - 0
include/compiler.h

@@ -50,6 +50,9 @@ typedef unsigned long ulong;
 #endif
 #ifdef __FreeBSD__
 # include <sys/endian.h> /* htole32 and friends */
+# define __BYTE_ORDER BYTE_ORDER
+# define __LITTLE_ENDIAN LITTLE_ENDIAN
+# define __BIG_ENDIAN BIG_ENDIAN
 #elif defined(__OpenBSD__)
 # include <endian.h>
 # define __BYTE_ORDER BYTE_ORDER