In preparation for making the modules actually use opt_*.h files

provided in the kernel build directory, fix modules that were
failing to build this way due to not quite correct kernel option
usage.  In particular:

ng_mppc.c uses two complementary options, both of which are listed
in sys/conf/files.  Ideally, there should be a separate option for
including ng_mppc.c in kernel build, but now only
NETGRAPH_MPPC_ENCRYPTION is usable anyway, the other one requires
proprietary files.

nwfs and smbfs were trying to ensure they were built with proper
network components, but the check was rather questionable.

Discussed with:	ru
This commit is contained in:
Yaroslav Tykhiy 2005-10-14 23:17:45 +00:00
parent 9c3acb0bc1
commit 10d645b7e5
3 changed files with 6 additions and 8 deletions

View file

@ -31,10 +31,6 @@
*
* $FreeBSD$
*/
#include "opt_ncp.h"
#ifndef NCP
#error "NWFS requires NCP protocol"
#endif
#include <sys/param.h>
#include <sys/systm.h>

View file

@ -31,10 +31,6 @@
*
* $FreeBSD$
*/
#include "opt_netsmb.h"
#ifndef NETSMB
#error "SMBFS requires option NETSMB"
#endif
#include <sys/param.h>
#include <sys/systm.h>

View file

@ -63,8 +63,14 @@
#include "opt_netgraph.h"
#if !defined(NETGRAPH_MPPC_COMPRESSION) && !defined(NETGRAPH_MPPC_ENCRYPTION)
#ifdef KLD_MODULE
/* XXX NETGRAPH_MPPC_COMPRESSION isn't functional yet */
#define NETGRAPH_MPPC_ENCRYPTION
#else
/* This case is indicative of an error in sys/conf files */
#error Need either NETGRAPH_MPPC_COMPRESSION or NETGRAPH_MPPC_ENCRYPTION
#endif
#endif
#ifdef NG_SEPARATE_MALLOC
MALLOC_DEFINE(M_NETGRAPH_MPPC, "netgraph_mppc", "netgraph mppc node ");