[Mesa-dev] [PATCH 3/5] compiler: define endian for FreeBSD

Greg V greg at unrelenting.technology
Mon Oct 23 20:20:41 UTC 2017


Obtained from: FreeBSD ports
---
 src/mesa/main/compiler.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h
index 43a06b4313..8652aac36c 100644
--- a/src/mesa/main/compiler.h
+++ b/src/mesa/main/compiler.h
@@ -51,6 +51,9 @@
 #if defined(__linux__)
 #include <byteswap.h>
 #define CPU_TO_LE32( x )	bswap_32( x )
+#elif defined(__FreeBSD__)
+#include <sys/endian.h>
+#define CPU_TO_LE32( x )	bswap32( x )
 #elif defined(__APPLE__)
 #include <CoreFoundation/CFByteOrder.h>
 #define CPU_TO_LE32( x )	CFSwapInt32HostToLittle( x )
-- 
2.14.2



More information about the mesa-dev mailing list