From 9e0534ca6427c3baeeb47682dfe46b15da80eb57 Mon Sep 17 00:00:00 2001 From: guy Date: Sat, 20 Apr 2002 10:02:16 +0000 Subject: 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++. --- bpf/net/bpf.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bpf') 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 -- cgit v1.2.3