Skip to contentSkip to conversation

Android.mk: Add -D_GNU_SOURCE to common_cflags

PATCH Stephen Smalley 1 participant 1 message Apr 11, 2016 1 message not in the archive SELinux security module

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Stephen Smalley

author Applied
#1 lore raw
Quoted 8 lines · Nick Kralevich

Other build scripts define -D_GNU_SOURCE. The Android build system should too.

Fixes the following warning:

external/selinux/libsepol/cil/src/cil_mem.c:109:7: warning: implicit
declaration of function 'vasprintf' is invalid in C99 [-Wimplicit-function-declaration]

Thanks, applied.

Quoted 17 lines
---
 libsepol/Android.mk | 1 +
 1 file changed, 1 insertion(+)
libsepol/Android.mk +1 -0
index a43b343..5d2c96b 100644
@@ -64,6 +64,7 @@ cil_src_files := \
 	cil/src/cil_verify.c
 
 common_cflags := \
+	-D_GNU_SOURCE \
 	-Wall -W -Wundef \
 	-Wshadow -Wmissing-noreturn \
 	-Wmissing-format-attribute