diff options
author | Aurimas Liutikas <aurimas@google.com> | 2016-04-29 10:19:07 -0700 |
---|---|---|
committer | Aurimas Liutikas <aurimas@google.com> | 2016-04-29 13:18:50 -0700 |
commit | 06f4ccba53c17ecdeac0659a01f1d44ceddab521 (patch) | |
tree | e6c1bcbadf2e1b6e8e7f40818667c4d7ace955bc | |
parent | 8400b186c9f3573d887b88f17955213ad868198c (diff) | |
download | libpcap-06f4ccba53c17ecdeac0659a01f1d44ceddab521.tar.gz |
Add #ifndef checks for macros
Add #ifndef checks for BPF_STMT and BPF_JUMP macros.
Bug: 26936282
Change-Id: I02a085bf8eccb5c3ba236b07c66b64afa02bb2a5
-rw-r--r-- | Android.mk | 1 | ||||
-rw-r--r-- | pcap/bpf.h | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -3,6 +3,7 @@ LOCAL_PATH:= $(call my-dir) libpcap_cflags := \ -Wno-unused-parameter \ -D_U_="__attribute__((unused))" \ + -Werror \ include $(CLEAR_VARS) @@ -1489,8 +1489,12 @@ struct bpf_aux_data { /* * Macros for insn array initializers. */ +#ifndef BPF_STMT #define BPF_STMT(code, k) { (u_short)(code), 0, 0, k } +#endif +#ifndef BPF_JUMP #define BPF_JUMP(code, k, jt, jf) { (u_short)(code), jt, jf, k } +#endif #if __STDC__ || defined(__cplusplus) extern int bpf_validate(const struct bpf_insn *, int); |