[Mesa-dev] [PATCH 1/6] android: fix building issues of host binaries

Chih-Wei Huang cwhuang at android-x86.org
Fri Apr 3 14:01:21 PDT 2015


Define _GNU_SOURCE to enable features (__USE_XOPEN2K and __USE_UNIX98)
required to build the host binaries.

Signed-off-by: Chih-Wei Huang <cwhuang at linux.org.tw>
---
 Android.common.mk                    | 2 +-
 src/mesa/Android.mesa_gen_matypes.mk | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/Android.common.mk b/Android.common.mk
index a4ee181..edf52d6 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -24,7 +24,7 @@
 # use c99 compiler by default
 ifeq ($(LOCAL_CC),)
 ifeq ($(LOCAL_IS_HOST_MODULE),true)
-LOCAL_CC := $(HOST_CC) -std=c99
+LOCAL_CC := $(HOST_CC) -std=c99 -D_GNU_SOURCE
 else
 LOCAL_CC := $(TARGET_CC) -std=c99
 endif
diff --git a/src/mesa/Android.mesa_gen_matypes.mk b/src/mesa/Android.mesa_gen_matypes.mk
index 5521087..6e301f9 100644
--- a/src/mesa/Android.mesa_gen_matypes.mk
+++ b/src/mesa/Android.mesa_gen_matypes.mk
@@ -33,7 +33,6 @@ include $(CLEAR_VARS)
 
 LOCAL_MODULE := mesa_gen_matypes
 LOCAL_IS_HOST_MODULE := true
-LOCAL_CFLAGS := -D_POSIX_C_SOURCE=199309L
 
 LOCAL_C_INCLUDES := \
 	$(MESA_TOP)/src/mapi \
-- 
1.9.1



More information about the mesa-dev mailing list