aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurimas Liutikas <aurimas@google.com>2016-04-29 21:22:37 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-04-29 21:22:37 +0000
commitceff7ea89296e2a780d1b8283c7c6c97676ace6e (patch)
tree3f58a14e261a756dd6aaa92b757294a1f51e4c6b
parentae8393dd9704bf3f666affebf731042c0b62a37b (diff)
parentc7958c10f7c77bd2acd81bd3eb4997d5cd5a3047 (diff)
downloadlibpcap-ceff7ea89296e2a780d1b8283c7c6c97676ace6e.tar.gz
Merge changes I02a085bf,Id5433d1d am: 9643d9ce73 am: de735023f2
am: c7958c10f7 * commit 'c7958c10f7c77bd2acd81bd3eb4997d5cd5a3047': Add #ifndef checks for macros Clean up version test Change-Id: If4210b1941f5986b88313920399f99e5805d2cc9
-rw-r--r--Android.mk1
-rw-r--r--pcap-common.c2
-rw-r--r--pcap/bpf.h4
3 files changed, 6 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk
index 0b916c02..3a68b882 100644
--- a/Android.mk
+++ b/Android.mk
@@ -3,6 +3,7 @@ LOCAL_PATH:= $(call my-dir)
libpcap_cflags := \
-Wno-unused-parameter \
-D_U_="__attribute__((unused))" \
+ -Werror \
include $(CLEAR_VARS)
diff --git a/pcap-common.c b/pcap-common.c
index 4db49688..b6f0c973 100644
--- a/pcap-common.c
+++ b/pcap-common.c
@@ -1321,7 +1321,7 @@ swap_nflog_header(const struct pcap_pkthdr *hdr, u_char *buf)
return;
}
- if (!(nfhdr->nflog_version) == 0) {
+ if (nfhdr->nflog_version != 0) {
/* Unknown NFLOG version */
return;
}
diff --git a/pcap/bpf.h b/pcap/bpf.h
index 215d5ca0..66b7a274 100644
--- a/pcap/bpf.h
+++ b/pcap/bpf.h
@@ -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);