[LLVMdev] [Patch] compiler-rt lib/int_endianness.h

Marco Peereboom marco at peereboom.us
Wed Jun 13 07:49:09 PDT 2012


Attached is a patch to pull in the correct endian.h file on the BSD'.  I
checked all OS' on the defined list and they all require machine
instead of sys.  While there I added __Bitrig__ which is a newly
launched OS that uses clang as it's compiler.

diff --git a/lib/int_endianness.h b/lib/int_endianness.h
index 70bd177..f821f9a 100644
--- a/lib/int_endianness.h
+++ b/lib/int_endianness.h
@@ -31,8 +31,8 @@
 
 /* .. */
 
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__minix)
-#include <sys/endian.h>
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__minix) || defined(__Bitrig__)
+#include <machine/endian.h>
 
 #if _BYTE_ORDER == _BIG_ENDIAN
 #define _YUGA_LITTLE_ENDIAN 0



More information about the llvm-dev mailing list