Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Fix building kernels w/o ether
details: https://anonhg.NetBSD.org/src/rev/1d13b55f16ca
branches: trunk
changeset: 340326:1d13b55f16ca
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Mon Aug 31 16:46:14 2015 +0000
description:
Fix building kernels w/o ether
diffstat:
sys/kern/init_main.c | 7 +++++--
sys/netinet/in.c | 15 +++++++++++++--
2 files changed, 18 insertions(+), 4 deletions(-)
diffs (110 lines):
diff -r 490c0b3d0e57 -r 1d13b55f16ca sys/kern/init_main.c
--- a/sys/kern/init_main.c Mon Aug 31 12:57:45 2015 +0000
+++ b/sys/kern/init_main.c Mon Aug 31 16:46:14 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init_main.c,v 1.468 2015/08/31 08:02:44 ozaki-r Exp $ */
+/* $NetBSD: init_main.c,v 1.469 2015/08/31 16:46:14 ozaki-r Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.468 2015/08/31 08:02:44 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.469 2015/08/31 16:46:14 ozaki-r Exp $");
#include "opt_ddb.h"
#include "opt_ipsec.h"
@@ -121,6 +121,7 @@
#endif
#include "drvctl.h"
+#include "ether.h"
#include "ksyms.h"
#include "veriexec.h"
@@ -566,7 +567,9 @@
*/
s = splnet();
ifinit();
+#if NETHER > 0
lltableinit();
+#endif
domaininit(true);
if_attachdomain();
splx(s);
diff -r 490c0b3d0e57 -r 1d13b55f16ca sys/netinet/in.c
--- a/sys/netinet/in.c Mon Aug 31 12:57:45 2015 +0000
+++ b/sys/netinet/in.c Mon Aug 31 16:46:14 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in.c,v 1.160 2015/08/31 09:21:55 ozaki-r Exp $ */
+/* $NetBSD: in.c,v 1.161 2015/08/31 16:46:14 ozaki-r Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,9 +91,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.160 2015/08/31 09:21:55 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.161 2015/08/31 16:46:14 ozaki-r Exp $");
#include "arp.h"
+#include "ether.h"
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1535,6 +1536,8 @@
return satosin(&ia->ia_addr);
}
+#if NETHER > 0
+
struct in_llentry {
struct llentry base;
};
@@ -1852,6 +1855,8 @@
return lle;
}
+#endif /* NETHER > 0 */
+
static void
in_sysctl_init(struct sysctllog **clog)
{
@@ -1885,6 +1890,7 @@
IPCTL_HOSTZEROBROADCAST, CTL_EOL);
}
+#if NETHER > 0
static struct lltable *
in_lltattach(struct ifnet *ifp)
{
@@ -1908,6 +1914,7 @@
return (llt);
}
+#endif /* NETHER > 0 */
void *
in_domifattach(struct ifnet *ifp)
@@ -1917,7 +1924,9 @@
ii = kmem_zalloc(sizeof(struct in_ifinfo), KM_SLEEP);
KASSERT(ii != NULL);
+#if NETHER > 0
ii->ii_llt = in_lltattach(ifp);
+#endif
#ifdef IPSELSRC
ii->ii_selsrc = in_selsrc_domifattach(ifp);
@@ -1935,6 +1944,8 @@
#ifdef IPSELSRC
in_selsrc_domifdetach(ifp, ii->ii_selsrc);
#endif
+#if NETHER > 0
lltable_free(ii->ii_llt);
+#endif
kmem_free(ii, sizeof(struct in_ifinfo));
}
Home |
Main Index |
Thread Index |
Old Index