[PATCH] compiler.h: only use inx/outx on ARM with glibc

Ross Burton ross.burton at intel.com
Thu Sep 20 12:28:42 UTC 2018


musl only implements inx/outx on x86, so check for __GLIBC__ instead of
__linux__.

Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 hw/xfree86/common/compiler.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 7144c6a27..fb53ced80 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -758,9 +758,9 @@ inl(unsigned short port)
     return xf86ReadMmio32Le((void *) ioBase, port);
 }
 
-#elif defined(__arm__) && defined(__linux__)
+#elif defined(__arm__) && defined(__GLIBC__)
 
-/* for Linux on ARM, we use the LIBC inx/outx routines */
+/* for glibc on ARM, we use the LIBC inx/outx routines */
 /* note that the appropriate setup via "ioperm" needs to be done */
 /*  *before* any inx/outx is done. */
 
-- 
2.11.0



More information about the xorg-devel mailing list