51 lines
1.2 KiB
Text
51 lines
1.2 KiB
Text
$NetBSD: patch-ay,v 1.2 2007/04/28 03:42:31 christos Exp $
|
|
|
|
--- system.c.orig 2006-01-12 16:21:06.000000000 -0500
|
|
+++ system.c 2007-04-27 19:00:30.000000000 -0400
|
|
@@ -568,7 +568,7 @@
|
|
|
|
#endif /* SUNOS4 */
|
|
|
|
-#if defined(SUNOS4) || defined(FREEBSD)
|
|
+#if defined(SUNOS4) || defined(ALLBSD)
|
|
static const struct xlat pathconflimits[] = {
|
|
#ifdef _PC_LINK_MAX
|
|
{ _PC_LINK_MAX, "_PC_LINK_MAX" }, /* max links to file/dir */
|
|
@@ -624,7 +624,7 @@
|
|
return 0;
|
|
}
|
|
|
|
-#endif /* SUNOS4 || FREEBSD */
|
|
+#endif /* SUNOS4 || ALLBSD */
|
|
|
|
#ifdef SVR4
|
|
|
|
@@ -1976,7 +1976,8 @@
|
|
}
|
|
#endif
|
|
|
|
-#ifdef FREEBSD
|
|
+#ifdef ALLBSD
|
|
+#include <sys/param.h>
|
|
#include <sys/sysctl.h>
|
|
|
|
int sys___sysctl(tcp)
|
|
@@ -1985,7 +1986,8 @@
|
|
int qoid[CTL_MAXNAME+2];
|
|
char ctl[1024];
|
|
size_t len;
|
|
- int i, numeric;
|
|
+ size_t i;
|
|
+ int numeric;
|
|
|
|
if (entering(tcp)) {
|
|
if (tcp->u_arg[1] < 0 || tcp->u_arg[1] > CTL_MAXNAME ||
|
|
@@ -2016,7 +2018,7 @@
|
|
} else {
|
|
if (!syserror(tcp) && (umove(tcp, tcp->u_arg[3], &len) >= 0)) {
|
|
printstr(tcp, tcp->u_arg[2], len);
|
|
- tprintf(", [%u], ", len);
|
|
+ tprintf(", [%zu], ", (size_t)len);
|
|
} else
|
|
tprintf("%#lx, %#lx, ", tcp->u_arg[2], tcp->u_arg[3]);
|
|
printstr(tcp, tcp->u_arg[4], tcp->u_arg[5]);
|