summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/contrib/pf/net/pfvar.h19
-rw-r--r--sys/netipsec/keydb.h3
2 files changed, 12 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];
diff --git a/sys/netipsec/keydb.h b/sys/netipsec/keydb.h
index 1ba8eb1..047f819 100644
--- a/sys/netipsec/keydb.h
+++ b/sys/netipsec/keydb.h
@@ -37,6 +37,8 @@
#include <netipsec/key_var.h>
+#ifndef _SOCKADDR_UNION_DEFINED
+#define _SOCKADDR_UNION_DEFINED
/*
* The union of all possible address formats we handle.
*/
@@ -45,6 +47,7 @@ union sockaddr_union {
struct sockaddr_in sin;
struct sockaddr_in6 sin6;
};
+#endif /* _SOCKADDR_UNION_DEFINED */
/* Security Assocciation Index */
/* NOTE: Ensure to be same address family */
OpenPOWER on IntegriCloud