From: Sascha Wildner Date: Wed, 11 Apr 2012 18:06:52 +0000 (+0200) Subject: kernel/nwfs: The NCP check only applies if it is not the module build. X-Git-Tag: v3.4.0rc~1137^2 X-Git-Url: https://gitweb.dragonflybsd.org/~nant/dragonfly.git/commitdiff_plain/888b1d329f88e552caae3f59c033f3af795b0ad0 kernel/nwfs: The NCP check only applies if it is not the module build. Add some dependency stuff that will cause nwfs to load ncp if it is not loaded or in the kernel. However ncp ultimately depends on IPX which is not available as a module, so that's the minimum that needs compiling into the kernel in order to use nwfs. This should really fix the kernel build. --- diff --git a/sys/netproto/ncp/Makefile b/sys/netproto/ncp/Makefile index 068fa20f81..d6dc3a4342 100644 --- a/sys/netproto/ncp/Makefile +++ b/sys/netproto/ncp/Makefile @@ -1,7 +1,4 @@ # $FreeBSD: src/sys/modules/ncp/Makefile,v 1.3 1999/12/12 21:15:51 peter Exp $ -# $DragonFly: src/sys/netproto/ncp/Makefile,v 1.4 2005/09/11 10:52:56 swildner Exp $ - -.PATH: ${.CURDIR}/../../netncp KMOD= ncp diff --git a/sys/netproto/ncp/ncp_mod.c b/sys/netproto/ncp/ncp_mod.c index 22c99baef9..a1351b37c1 100644 --- a/sys/netproto/ncp/ncp_mod.c +++ b/sys/netproto/ncp/ncp_mod.c @@ -541,3 +541,4 @@ static moduledata_t ncp_mod = { NULL }; DECLARE_MODULE(ncp, ncp_mod, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY); +MODULE_VERSION(ncp, 1); diff --git a/sys/vfs/nwfs/nwfs_vfsops.c b/sys/vfs/nwfs/nwfs_vfsops.c index 639999cc31..5d1ec33820 100644 --- a/sys/vfs/nwfs/nwfs_vfsops.c +++ b/sys/vfs/nwfs/nwfs_vfsops.c @@ -31,10 +31,13 @@ * * $FreeBSD: src/sys/nwfs/nwfs_vfsops.c,v 1.6.2.6 2001/10/25 19:18:54 dillon Exp $ */ + +#ifndef KLD_MODULE #include "opt_ncp.h" #ifndef NCP #error "NWFS requires NCP protocol" #endif +#endif #include #include @@ -89,6 +92,7 @@ static struct vfsops nwfs_vfsops = { VFS_SET(nwfs_vfsops, nwfs, VFCF_NETWORK); MODULE_VERSION(nwfs, 1); +MODULE_DEPEND(nwfs, ncp, 1, 1, 1); int nwfs_pbuf_freecnt = -1; /* start out unlimited */ static int nwfsid = 1;