From 96dea6f407145da96be4f2b980ddfaa8c4382510 Mon Sep 17 00:00:00 2001 From: cube Date: Sun, 9 Apr 2006 17:47:46 +0000 Subject: Adapt sysctl prototype for -current. The boundary is chosen as 3.99.16. The broken area is -current between Feb 24th 2006 and Mar 2nd 2006. Fixes PR#33226 by Cesar Catrian Carreno. --- pkgtools/libkver/files/lib/kver.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgtools/libkver/files/lib/kver.c b/pkgtools/libkver/files/lib/kver.c index 7d62bcdf256..dae85e7dada 100644 --- a/pkgtools/libkver/files/lib/kver.c +++ b/pkgtools/libkver/files/lib/kver.c @@ -1,4 +1,4 @@ -/* $NetBSD: kver.c,v 1.7 2005/03/30 06:41:01 seb Exp $ */ +/* $NetBSD: kver.c,v 1.8 2006/04/09 17:47:46 cube Exp $ */ #include #include @@ -53,6 +53,12 @@ static struct utsname real_utsname; } \ } +#if __NetBSD_Version__ >= 399001600 +#define SYSCTL_CONST const +#else +#define SYSCTL_CONST +#endif + static int str2osrevision(char *s) { @@ -153,8 +159,8 @@ kver_initialize(void) } int -sysctl(int *name, u_int namelen, void *oldp, size_t * oldlenp, const void *newp, - size_t newlen) +sysctl(SYSCTL_CONST int *name, u_int namelen, void *oldp, size_t * oldlenp, + const void *newp, size_t newlen) { _DIAGASSERT(name != NULL); -- cgit v1.2.3