Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys protect "union sockaddr_union" from being defined twice ...
details: https://anonhg.NetBSD.org/src/rev/6f8666965d01
branches: trunk
changeset: 772667:6f8666965d01
user: drochner <drochner%NetBSD.org@localhost>
date: Wed Jan 11 14:37:45 2012 +0000
description:
protect "union sockaddr_union" from being defined twice by a CPP symbol
(copied from FreeBSD), allows coexistence of (FAST_)IPSEC and pf
diffstat:
sys/dist/pf/net/pfvar.h | 19 ++++++++++---------
sys/netipsec/keydb.h | 5 ++++-
2 files changed, 14 insertions(+), 10 deletions(-)
diffs (66 lines):
diff -r d975b351b77c -r 6f8666965d01 sys/dist/pf/net/pfvar.h
--- a/sys/dist/pf/net/pfvar.h Wed Jan 11 12:40:26 2012 +0000
+++ b/sys/dist/pf/net/pfvar.h Wed Jan 11 14:37:45 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pfvar.h,v 1.19 2010/05/07 17:41:57 degroote Exp $ */
+/* $NetBSD: pfvar.h,v 1.20 2012/01/11 14:37:45 drochner Exp $ */
/* $OpenBSD: pfvar.h,v 1.254 2007/07/13 09:17:48 markus Exp $ */
/*
@@ -55,14 +55,6 @@
#include <net/pf_mtag.h>
#endif /* __NetBSD__ && _KERNEL */
-#ifdef __NetBSD__
-union sockaddr_union {
- struct sockaddr sa;
- struct sockaddr_in sin;
- struct sockaddr_in6 sin6;
-};
-#endif /* __NetBSD__ */
-
struct ip;
struct ip6_hdr;
@@ -984,6 +976,15 @@
#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 -r d975b351b77c -r 6f8666965d01 sys/netipsec/keydb.h
--- a/sys/netipsec/keydb.h Wed Jan 11 12:40:26 2012 +0000
+++ b/sys/netipsec/keydb.h Wed Jan 11 14:37:45 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: keydb.h,v 1.10 2011/05/23 15:17:25 drochner Exp $ */
+/* $NetBSD: keydb.h,v 1.11 2012/01/11 14:37:45 drochner Exp $ */
/* $FreeBSD: src/sys/netipsec/keydb.h,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $ */
/* $KAME: keydb.h,v 1.14 2000/08/02 17:58:26 sakane Exp $ */
@@ -42,6 +42,8 @@
#include <net/route.h>
#include <netinet/in.h>
+#ifndef _SOCKADDR_UNION_DEFINED
+#define _SOCKADDR_UNION_DEFINED
/*
* The union of all possible address formats we handle.
*/
@@ -50,6 +52,7 @@
struct sockaddr_in sin;
struct sockaddr_in6 sin6;
};
+#endif /* _SOCKADDR_UNION_DEFINED */
/* Security Assocciation Index */
/* NOTE: Ensure to be same address family */
Home |
Main Index |
Thread Index |
Old Index