From e7b883c427297e23d68c18fb70a00d277f3d7997 Mon Sep 17 00:00:00 2001 From: Juli Mallett Date: Tue, 1 Jul 2003 20:15:28 +0000 Subject: Make the sysctlbyname stuff look like the 2-level MIB stuff. This means actually setting 'len', for example. Which will make uname -i work on some systems where it did not. Anywhere where it did work, it was a matter of coincidence. Submitted by: redpixel on EFnet. --- usr.bin/uname/uname.c | 1 + 1 file changed, 1 insertion(+) (limited to 'usr.bin/uname') diff --git a/usr.bin/uname/uname.c b/usr.bin/uname/uname.c index d4642ffdf8e0..81aef452a74e 100644 --- a/usr.bin/uname/uname.c +++ b/usr.bin/uname/uname.c @@ -199,6 +199,7 @@ native_##var(void) \ static char buf[1024]; \ char **varp = &(var); \ \ + len = sizeof buf; \ if (sysctlbyname(name, &buf, &len, NULL,\ 0) == -1) \ err(1, "sysctlbyname"); -- cgit v1.2.3