[Mesa-dev] [PATCH] u_endian.h: make endianness check libc agnostic

maxin.john at gmail.com maxin.john at gmail.com
Wed Mar 21 14:52:15 UTC 2018


From: Khem Raj <raj.khem at gmail.com>

endianness check is OS wide and not specific to libc.
Fixes build with musl libc

Signed-off-by: Khem Raj <raj.khem at gmail.com>
Signed-off-by: Maxin B. John <maxin.john at intel.com>
---
 src/util/u_endian.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/u_endian.h b/src/util/u_endian.h
index 22d011e..4d5b4f4 100644
--- a/src/util/u_endian.h
+++ b/src/util/u_endian.h
@@ -27,7 +27,7 @@
 #ifndef U_ENDIAN_H
 #define U_ENDIAN_H
 
-#if defined(__GLIBC__) || defined(ANDROID) || defined(__CYGWIN__)
+#if defined(__linux__)
 #include <endian.h>
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
-- 
2.4.0



More information about the mesa-dev mailing list