diff options
author | cube <cube@pkgsrc.org> | 2005-09-08 17:57:35 +0000 |
---|---|---|
committer | cube <cube@pkgsrc.org> | 2005-09-08 17:57:35 +0000 |
commit | 0c6e48276c0f82c7f23a267061dbbf6844a2cff3 (patch) | |
tree | d68a8893f021b903b1431fb676ebe1810e383f73 | |
parent | 2f457fc073903ce52bab8667799d682f4e0cceca (diff) | |
download | pkgsrc-0c6e48276c0f82c7f23a267061dbbf6844a2cff3.tar.gz |
Make netbsd-tap compile on NetBSD 3.99.6+ (sysctl constification).
-rw-r--r-- | net/netbsd-tap/files/if_tap.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/net/netbsd-tap/files/if_tap.c b/net/netbsd-tap/files/if_tap.c index 572ae10ec6b..949a9eef8ec 100644 --- a/net/netbsd-tap/files/if_tap.c +++ b/net/netbsd-tap/files/if_tap.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_tap.c,v 1.6 2005/06/10 15:06:33 cube Exp $ */ +/* $NetBSD: if_tap.c,v 1.7 2005/09/08 17:57:35 cube Exp $ */ /* * Copyright (c) 2003, 2004 The NetBSD Foundation. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.6 2005/06/10 15:06:33 cube Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.7 2005/09/08 17:57:35 cube Exp $"); #if defined(_KERNEL_OPT) #include "bpfilter.h" @@ -91,6 +91,11 @@ __KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.6 2005/06/10 15:06:33 cube Exp $"); static int tap_node; static int tap_sysctl_handler(SYSCTLFN_PROTO); SYSCTL_SETUP_PROTO(sysctl_tap_setup); +#if __NetBSD_Version__ < 399000600 +# define __SYSCTL_CONST +#else +# define __SYSCTL_CONST const +#endif /* * Since we're an Ethernet device, we need the 3 following @@ -263,7 +268,7 @@ tap_attach(struct device *parent, struct device *self, void *aux) char enaddrstr[18]; uint32_t ui; int error; - struct sysctlnode *node; + __SYSCTL_CONST struct sysctlnode *node; aprint_normal("%s: faking Ethernet device\n", self->dv_xname); @@ -1209,7 +1214,7 @@ tap_kqread(struct knote *kn, long hint) */ SYSCTL_SETUP(sysctl_tap_setup, "sysctl net.link.tap subtree setup") { - struct sysctlnode *node; + __SYSCTL_CONST struct sysctlnode *node; int error = 0; if ((error = sysctl_createv(clog, 0, NULL, NULL, |