aboutsummaryrefslogtreecommitdiffstats
path: root/bpf
diff options
context:
space:
mode:
authorguy <guy>2002-04-20 10:02:16 +0000
committerguy <guy>2002-04-20 10:02:16 +0000
commit9e0534ca6427c3baeeb47682dfe46b15da80eb57 (patch)
tree70062162ea20f571effc287ea2b452b5bb8fbdbe /bpf
parent4f544108b45e9d477862b182d145f334c2d53725 (diff)
Throw in
#ifdef __cplusplus extern "C" { #endif and change #if __STDC__ to #if __STDC__ || defined(__cplusplus) around the non-kernel function prototypes, so they work right when compiling with C++.
Diffstat (limited to 'bpf')
-rw-r--r--bpf/net/bpf.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/bpf/net/bpf.h b/bpf/net/bpf.h
index 87256b5..8c76e48 100644
--- a/bpf/net/bpf.h
+++ b/bpf/net/bpf.h
@@ -37,11 +37,15 @@
*
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
*
- * @(#) $Header: /tcpdump/master/libpcap/bpf/net/Attic/bpf.h,v 1.54 2002-03-08 11:16:34 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/bpf/net/Attic/bpf.h,v 1.55 2002-04-20 10:02:16 guy Exp $ (LBL)
*/
#ifndef BPF_MAJOR_VERSION
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* BSD style release date */
#define BPF_RELEASE 199606
@@ -421,7 +425,7 @@ extern void bpfattach();
extern void bpfilterattach();
# endif /* __STDC__ */
#endif /* BSD && (_KERNEL || KERNEL) */
-#if __STDC__
+#if __STDC__ || defined(__cplusplus)
extern int bpf_validate(struct bpf_insn *, int);
extern u_int bpf_filter(struct bpf_insn *, u_char *, u_int, u_int);
#else
@@ -434,4 +438,8 @@ extern u_int bpf_filter();
*/
#define BPF_MEMWORDS 16
+#ifdef __cplusplus
+}
+#endif
+
#endif