Skip to content

Commit

Permalink
It seems we cannot depend on kernel config in modules, so always compile
Browse files Browse the repository at this point in the history
in PPP(,oE) support.
  • Loading branch information
roy committed May 31, 2015
1 parent 3947ce0 commit 5f081b1
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions sys/compat/netbsd32/netbsd32_ioctl.c
@@ -1,4 +1,4 @@
/* $NetBSD: netbsd32_ioctl.c,v 1.77 2015/05/31 22:19:41 roy Exp $ */
/* $NetBSD: netbsd32_ioctl.c,v 1.78 2015/05/31 22:58:50 roy Exp $ */

/*
* Copyright (c) 1998, 2001 Matthew R. Green
Expand Down Expand Up @@ -31,10 +31,7 @@
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.77 2015/05/31 22:19:41 roy Exp $");

#include "pppoe.h"
#include "sppp.h"
__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.78 2015/05/31 22:58:50 roy Exp $");

#include <sys/param.h>
#include <sys/systm.h>
Expand Down Expand Up @@ -68,12 +65,8 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.77 2015/05/31 22:19:41 roy Exp
#include <net/if.h>
#include <net/route.h>

#if NPPPOE > 0
#include <net/if_pppoe.h>
#endif
#if NSPPP > 0
#include <net/if_sppp.h>
#endif

#include <net/bpf.h>
#include <netinet/in.h>
Expand Down Expand Up @@ -169,7 +162,6 @@ netbsd32_to_ifmediareq(struct netbsd32_ifmediareq *s32p, struct ifmediareq *p, u
p->ifm_ulist = (int *)NETBSD32PTR64(s32p->ifm_ulist);
}

#if NPPPOE > 0
static inline void
netbsd32_to_pppoediscparms(struct netbsd32_pppoediscparms *s32p,
struct pppoediscparms *p, u_long cmd)
Expand All @@ -182,9 +174,7 @@ netbsd32_to_pppoediscparms(struct netbsd32_pppoediscparms *s32p,
p->service_name = (char *)NETBSD32PTR64(s32p->service_name);
p->service_name_len = s32p->service_name_len;
}
#endif

#if NSPPP > 0
static inline void
netbsd32_to_spppauthcfg(struct netbsd32_spppauthcfg *s32p,
struct spppauthcfg *p, u_long cmd)
Expand All @@ -204,7 +194,6 @@ netbsd32_to_spppauthcfg(struct netbsd32_spppauthcfg *s32p,
p->hisname = (char *)NETBSD32PTR64(s32p->hisname);
p->hissecret = (char *)NETBSD32PTR64(s32p->hissecret);
}
#endif

static inline void
netbsd32_to_ifdrv(struct netbsd32_ifdrv *s32p, struct ifdrv *p, u_long cmd)
Expand Down Expand Up @@ -548,7 +537,6 @@ netbsd32_from_ifmediareq(struct ifmediareq *p, struct netbsd32_ifmediareq *s32p,
#endif
}

#if NPPPOE > 0
static inline void
netbsd32_from_pppoediscparms(struct pppoediscparms *p,
struct netbsd32_pppoediscparms *s32p, u_long cmd)
Expand All @@ -561,9 +549,7 @@ netbsd32_from_pppoediscparms(struct pppoediscparms *p,
NETBSD32PTR32(s32p->service_name, p->service_name);
s32p->service_name_len = p->service_name_len;
}
#endif

#if NSPPP > 0
static inline void
netbsd32_from_spppauthcfg(struct spppauthcfg *p,
struct netbsd32_spppauthcfg *s32p, u_long cmd)
Expand All @@ -583,7 +569,6 @@ netbsd32_from_spppauthcfg(struct spppauthcfg *p,
NETBSD32PTR32(s32p->hisname, p->hisname);
NETBSD32PTR32(s32p->hissecret, p->hissecret);
}
#endif

static inline void
netbsd32_from_ifdrv(struct ifdrv *p, struct netbsd32_ifdrv *s32p, u_long cmd)
Expand Down Expand Up @@ -1124,18 +1109,14 @@ netbsd32_ioctl(struct lwp *l, const struct netbsd32_ioctl_args *uap, register_t
case SIOCGIFMEDIA32:
IOCTL_STRUCT_CONV_TO(SIOCGIFMEDIA, ifmediareq);

#if NPPPOE > 0
case PPPOESETPARMS32:
IOCTL_STRUCT_CONV_TO(PPPOESETPARMS, pppoediscparms);
case PPPOEGETPARMS32:
IOCTL_STRUCT_CONV_TO(PPPOEGETPARMS, pppoediscparms);
#endif
#if NSPPP > 0
case SPPPGETAUTHCFG32:
IOCTL_STRUCT_CONV_TO(SPPPGETAUTHCFG, spppauthcfg);
case SPPPSETAUTHCFG32:
IOCTL_STRUCT_CONV_TO(SPPPSETAUTHCFG, spppauthcfg);
#endif

case SIOCSDRVSPEC32:
IOCTL_STRUCT_CONV_TO(SIOCSDRVSPEC, ifdrv);
Expand Down

0 comments on commit 5f081b1

Please sign in to comment.