diff options
author | JP Abgrall <jpa@google.com> | 2011-06-02 15:44:47 -0700 |
---|---|---|
committer | JP Abgrall <jpa@google.com> | 2011-06-02 15:44:47 -0700 |
commit | 7ba421f1d968e5aa819bc5b49bd40cd127daa5fa (patch) | |
tree | 280ac8aa9362d372ac5a162e4a5bd428ceb6e624 | |
parent | f3e7d3f9f00a6daaf2fad79f391013fb3fcde81a (diff) | |
download | iptables-7ba421f1d968e5aa819bc5b49bd40cd127daa5fa.tar.gz |
android build: support lack of __ANDROID__ in older toolchains
The external master repo uses
arm-eabi-4.4.3
which doesn't define
__ANDROID__
causing the newly added conditionals to fail, leading to
an redefinition of 'struct iphdr'.
Change-Id: If92e3e7c221f903c8f6f92d7dba91de59314769e
-rw-r--r-- | Android.mk | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -19,7 +19,8 @@ LOCAL_C_INCLUDES:= \ $(KERNEL_HEADERS) \ $(LOCAL_PATH)/include/ -LOCAL_CFLAGS:= +# Accommodate arm-eabi-4.4.3 tools that don't set __ANDROID__ +LOCAL_CFLAGS:=-D__ANDROID__ LOCAL_SRC_FILES:= \ libiptc/libip4tc.c \ @@ -40,7 +41,8 @@ LOCAL_C_INCLUDES:= \ $(KERNEL_HEADERS) \ $(LOCAL_PATH)/include/ -LOCAL_CFLAGS:= +# Accommodate arm-eabi-4.4.3 tools that don't set __ANDROID__ +LOCAL_CFLAGS:=-D__ANDROID__ LOCAL_SRC_FILES:= \ libiptc/libip6tc.c \ @@ -86,6 +88,8 @@ LOCAL_C_INCLUDES:= \ LOCAL_CFLAGS:=-DNO_SHARED_LIBS=1 LOCAL_CFLAGS+=-DXTABLES_INTERNAL LOCAL_CFLAGS+=-DXTABLES_LIBDIR=\"xtables_libdir_not_used\" +# Accommodate arm-eabi-4.4.3 tools that don't set __ANDROID__ +LOCAL_CFLAGS+=-D__ANDROID__ LOCAL_LDFLAGS:=-version-info 5:0:0 LOCAL_SRC_FILES:= \ @@ -140,6 +144,8 @@ LOCAL_CFLAGS:=-DNO_SHARED_LIBS=1 # The $* does not work as expected. It ends up empty. Even with SECONDEXPANSION. # LOCAL_CFLAGS+=-D_INIT=lib$*_init LOCAL_CFLAGS+=-DXTABLES_INTERNAL +# Accommodate arm-eabi-4.4.3 tools that don't set __ANDROID__ +LOCAL_CFLAGS+=-D__ANDROID__ MY_initext_func := $(addprefix xt_,${MY_pfx_build_mod}) MY_GEN_INITEXT:= $(MY_intermediates)/extensions/initext.c @@ -201,6 +207,8 @@ LOCAL_CFLAGS:=-DNO_SHARED_LIBS=1 # The $* does not work as expected. It ends up empty. Even with SECONDEXPANSION. # LOCAL_CFLAGS+=-D_INIT=lib$*_init LOCAL_CFLAGS+=-DXTABLES_INTERNAL +# Accommodate arm-eabi-4.4.3 tools that don't set __ANDROID__ +LOCAL_CFLAGS+=-D__ANDROID__ MY_initext4_func := $(addprefix ipt_,${MY_pf4_build_mod}) MY_GEN_INITEXT4:= $(MY_intermediates)/extensions/initext4.c @@ -262,6 +270,8 @@ LOCAL_CFLAGS:=-DNO_SHARED_LIBS=1 # The $* does not work as expected. It ends up empty. Even with SECONDEXPANSION. # LOCAL_CFLAGS+=-D_INIT=lib$*_init LOCAL_CFLAGS+=-DXTABLES_INTERNAL +# Accommodate arm-eabi-4.4.3 tools that don't set __ANDROID__ +LOCAL_CFLAGS+=-D__ANDROID__ MY_initext6_func := $(addprefix ip6t_,${MY_pf6_build_mod}) MY_GEN_INITEXT6:= $(MY_intermediates)/extensions/initext6.c @@ -311,6 +321,8 @@ LOCAL_C_INCLUDES:= \ LOCAL_CFLAGS:=-DNO_SHARED_LIBS=1 LOCAL_CFLAGS+=-DALL_INCLUSIVE LOCAL_CFLAGS+=-DXTABLES_INTERNAL +# Accommodate arm-eabi-4.4.3 tools that don't set __ANDROID__ +LOCAL_CFLAGS+=-D__ANDROID__ LOCAL_SRC_FILES:= \ iptables-standalone.c iptables.c xshared.c @@ -337,6 +349,8 @@ LOCAL_C_INCLUDES:= \ LOCAL_CFLAGS:=-DNO_SHARED_LIBS=1 LOCAL_CFLAGS+=-DALL_INCLUSIVE LOCAL_CFLAGS+=-DXTABLES_INTERNAL +# Accommodate arm-eabi-4.4.3 tools that don't set __ANDROID__ +LOCAL_CFLAGS+=-D__ANDROID__ LOCAL_SRC_FILES:= \ ip6tables-standalone.c ip6tables.c xshared.c |