[Mesa-dev] [PATCH 10/12] android: fix building errors with stlport

Chih-Wei Huang cwhuang at android-x86.org
Fri May 15 11:42:25 PDT 2015


In Android the nouveau driver is built with stlport by including
libstlport.mk. However, it changes the include paths order to be
in favor of external/stlport/stlport. The assert.h defined in it
is chosen that causes the building errors on compiling C code.

Strictly speaking, stlport should only be added to C++'s include paths.
However, the Android build system doesn't support 'LOCAL_CPP_INCLUDES'.

Workaround the problem by GCC's #include_next so the bionic's assert.h
will be chosen.

Signed-off-by: Chih-Wei Huang <cwhuang at linux.org.tw>
---
 src/util/list.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/util/list.h b/src/util/list.h
index 9460347..3f979cfb 100644
--- a/src/util/list.h
+++ b/src/util/list.h
@@ -40,7 +40,11 @@
 
 #include <stdbool.h>
 #include <stddef.h>
+#ifdef ANDROID
+#include_next <assert.h>
+#else
 #include <assert.h>
+#endif
 
 
 struct list_head
-- 
1.9.1



More information about the mesa-dev mailing list