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.
This commit is contained in:
parent
e95ec1f864
commit
a10a3eab32
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user