Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net apply a little more #ifdef INET/INET6. fixes !INET6...



details:   https://anonhg.NetBSD.org/src/rev/09232d7c842a
branches:  trunk
changeset: 829430:09232d7c842a
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Jan 31 07:33:18 2018 +0000

description:
apply a little more #ifdef INET/INET6.  fixes !INET6 builds.

diffstat:

 sys/net/if_ipsec.c |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (49 lines):

diff -r df047f542c3d -r 09232d7c842a sys/net/if_ipsec.c
--- a/sys/net/if_ipsec.c        Tue Jan 30 22:45:12 2018 +0000
+++ b/sys/net/if_ipsec.c        Wed Jan 31 07:33:18 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ipsec.c,v 1.2 2018/01/15 02:39:53 knakahara Exp $  */
+/*     $NetBSD: if_ipsec.c,v 1.3 2018/01/31 07:33:18 mrg Exp $  */
 
 /*
  * Copyright (c) 2017 Internet Initiative Japan Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.2 2018/01/15 02:39:53 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.3 2018/01/31 07:33:18 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -782,18 +782,30 @@
 }
 
 struct encap_funcs {
+#ifdef INET
        int (*ef_inet)(struct ipsec_variant *);
+#endif
+#ifdef INET6
        int (*ef_inet6)(struct ipsec_variant *);
+#endif
 };
 
 static struct encap_funcs ipsec_encap_attach = {
+#ifdef INET
        .ef_inet = ipsecif4_attach,
+#endif
+#ifdef INET6
        .ef_inet6 = &ipsecif6_attach,
+#endif
 };
 
 static struct encap_funcs ipsec_encap_detach = {
+#ifdef INET
        .ef_inet = ipsecif4_detach,
+#endif
+#ifdef INET6
        .ef_inet6 = &ipsecif6_detach,
+#endif
 };
 
 static int



Home | Main Index | Thread Index | Old Index