summaryrefslogtreecommitdiff
path: root/sysutils/strace/patches/patch-ay
blob: 6ced4f2f87d5da91ffd61a533aed7b0795cd2066 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
$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]);