Skip to content

Commit

Permalink
Merge "Clang has no variable length array in structure."
Browse files Browse the repository at this point in the history
  • Loading branch information
chih-hung authored and Gerrit Code Review committed Sep 3, 2014
2 parents 5d4c868 + 6fc3c74 commit df05990
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ip/Android.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
# clang cannot compile 'variable length array in structure' in ipxfrm.c
LOCAL_CLANG := false
LOCAL_SRC_FILES := ip.c ipaddress.c ipaddrlabel.c iproute.c iprule.c ipnetns.c \
rtm_map.c iptunnel.c ip6tunnel.c tunnel.c ipneigh.c ipntable.c iplink.c \
ipmaddr.c ipmonitor.c ipmroute.c ipprefix.c iptuntap.c \
Expand Down
6 changes: 6 additions & 0 deletions lib/Android.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
# clang cannot compile 'variable length array in structure' in ipxfrm.c
LOCAL_CLANG := false
LOCAL_SRC_FILES := utils.c rt_names.c ll_types.c ll_proto.c ll_addr.c inet_proto.c
LOCAL_MODULE := libiprouteutil
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
Expand Down Expand Up @@ -30,11 +32,14 @@ LOCAL_CFLAGS := -O2 -g -W -Wall \
-DHAVE_TYPE_SSIZE_T \
-Wno-pointer-arith \
-Wno-sign-compare \
-Wno-unused-parameter \
-Werror

include $(BUILD_SHARED_LIBRARY)

include $(CLEAR_VARS)
# clang cannot compile 'variable length array in structure' in ipxfrm.c
LOCAL_CLANG := false
LOCAL_SRC_FILES := ll_map.c libnetlink.c
LOCAL_MODULE := libnetlink
LOCAL_SYSTEM_SHARED_LIBRARIES := libc
Expand Down Expand Up @@ -63,6 +68,7 @@ LOCAL_CFLAGS := -O2 -g -W -Wall \
-DHAVE_TYPE_SSIZE_T \
-Wno-pointer-arith \
-Wno-sign-compare \
-Wno-unused-parameter \
-Werror

include $(BUILD_SHARED_LIBRARY)
6 changes: 5 additions & 1 deletion tc/Android.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
# clang cannot compile 'variable length array in structure' in ipxfrm.c
LOCAL_CLANG := false
LOCAL_SRC_FILES := tc.c tc_qdisc.c q_cbq.c tc_util.c tc_class.c tc_core.c m_action.c \
m_estimator.c tc_filter.c tc_monitor.c tc_stab.c tc_cbq.c \
tc_estimator.c f_u32.c m_police.c q_ingress.c m_mirred.c q_htb.c
Expand All @@ -14,7 +16,9 @@ LOCAL_SHARED_LIBRARIES += libiprouteutil libnetlink

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include

LOCAL_CFLAGS := -O2 -g -W -Wall -Wno-pointer-arith -Wno-sign-compare -Werror
LOCAL_CFLAGS := -O2 -g -W -Wall -Wno-pointer-arith -Wno-sign-compare -Werror \
-Wno-unused-parameter \
-Wno-missing-field-initializers

include $(BUILD_EXECUTABLE)

0 comments on commit df05990

Please sign in to comment.