android: fix building issues of host binaries
authorChih-Wei Huang <cwhuang@android-x86.org>
Fri, 3 Apr 2015 21:01:21 +0000 (05:01 +0800)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 22 Apr 2015 14:53:35 +0000 (15:53 +0100)
Define _GNU_SOURCE to enable features (__USE_XOPEN2K and __USE_UNIX98)
required to build the host binaries.

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Android.common.mk
src/mesa/Android.mesa_gen_matypes.mk

index a4ee181b752ef72e3cb1ded739494fba86b1e7e1..edf52d6fabbbb4aa6f69034701119fa220aacea6 100644 (file)
@@ -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
index 5521087c4fa2296fa3c6064d88360fbe2ed83990..6e301f90416bd713acf8a2e8ef6e6e89f9fb2442 100644 (file)
@@ -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 \