summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2004-09-23 12:44:40 +0000
committermlaier <mlaier@FreeBSD.org>2004-09-23 12:44:40 +0000
commit83e80bafbae946198508ae4d644be71d1f765b96 (patch)
tree19501bf38e095177e8ca88f3be7937911e93d7ce /sys/contrib
parentd240df25edbe48c96491200f17cc79a897c8c955 (diff)
downloadFreeBSD-src-83e80bafbae946198508ae4d644be71d1f765b96.zip
FreeBSD-src-83e80bafbae946198508ae4d644be71d1f765b96.tar.gz
Protect sockaddr_union definitions with a protecting define. This allows to
build kernels with FAST_IPSEC and PF. This is the least disruptive fix. PR: kern/71836 Reviewed by: bms, various mailing lists MFC after: 3 days
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/pf/net/pfvar.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/contrib/pf/net/pfvar.h b/sys/contrib/pf/net/pfvar.h
index c8b0321..11446f8 100644
--- a/sys/contrib/pf/net/pfvar.h
+++ b/sys/contrib/pf/net/pfvar.h
@@ -49,16 +49,6 @@
#ifdef __FreeBSD__
#include <netinet/in.h>
-/*
- * XXX
- * If we include <netipsec/keydb.h>, we need _KERNEL definition.
- * This makes pfctl compilation difficult.
- */
-union sockaddr_union {
- struct sockaddr sa;
- struct sockaddr_in sin;
- struct sockaddr_in6 sin6;
-};
#endif
#include <netinet/tcp_fsm.h>
@@ -831,6 +821,15 @@ struct pfr_tstats {
#define pfrts_name pfrts_t.pfrt_name
#define pfrts_flags pfrts_t.pfrt_flags
+#ifndef _SOCKADDR_UNION_DEFINED
+#define _SOCKADDR_UNION_DEFINED
+union sockaddr_union {
+ struct sockaddr sa;
+ struct sockaddr_in sin;
+ struct sockaddr_in6 sin6;
+};
+#endif /* _SOCKADDR_UNION_DEFINED */
+
SLIST_HEAD(pfr_kentryworkq, pfr_kentry);
struct pfr_kentry {
struct radix_node pfrke_node[2];
OpenPOWER on IntegriCloud