]> The Tcpdump Group git mirrors - libpcap/commitdiff
Partially fix building on QNX 6.5.
authorGuy Harris <[email protected]>
Thu, 27 Nov 2014 21:13:34 +0000 (13:13 -0800)
committerGuy Harris <[email protected]>
Thu, 27 Nov 2014 21:13:34 +0000 (13:13 -0800)
From GitHub pull request #394; that was requested as a pull to the old
1.2 branch, not the trunk.  I also updated comments to reflect the
changes.

pcap/bpf.h
pcap/pcap.h

index 48805087e86b9dc731a317aa775d2bc2597ff981..8b116cd9df64e3dd8803370e983f70aa6e74aed2 100644 (file)
@@ -59,7 +59,8 @@
  * or Tru64 UNIX-style multiple-include protection (or, at least,
  * Tru64 UNIX 5.x-style; I don't have earlier versions available to check),
  * or AIX-style multiple-include protection (or, at least, AIX 5.x-style;
- * I don't have earlier versions available to check).
+ * I don't have earlier versions available to check), or QNX-style
+ * multiple-include protection (as per GitHub pull request #394).
  *
  * We do not check for BPF_MAJOR_VERSION, as that's defined by
  * <linux/filter.h>, which is directly or indirectly included in some
@@ -68,7 +69,7 @@
  *
  * This also provides our own multiple-include protection.
  */
-#if !defined(_NET_BPF_H_) && !defined(_BPF_H_) && !defined(_H_BPF) && !defined(lib_pcap_bpf_h)
+#if !defined(_NET_BPF_H_) && !defined(_NET_BPF_H_INCLUDED) && !defined(_BPF_H_) && !defined(_H_BPF) && !defined(lib_pcap_bpf_h)
 #define lib_pcap_bpf_h
 
 #ifdef __cplusplus
index 7e1f2cd2a6091322302d18725465792250f46085..e4a42603b34e982ac3a6c635352e4a652b414bf8 100644 (file)
@@ -424,13 +424,13 @@ void      pcap_freealldevs(pcap_if_t *);
 const char *pcap_lib_version(void);
 
 /*
- * On at least some versions of NetBSD, we don't want to declare
+ * On at least some versions of NetBSD and QNX, we don't want to declare
  * bpf_filter() here, as it's also be declared in <net/bpf.h>, with a
  * different signature, but, on other BSD-flavored UN*Xes, it's not
  * declared in <net/bpf.h>, so we *do* want to declare it here, so it's
  * declared when we build pcap-bpf.c.
  */
-#ifndef __NetBSD__
+#if !defined(__NetBSD__) && !defined(__QNX__)
 u_int  bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
 #endif
 int    bpf_validate(const struct bpf_insn *f, int len);