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
331e012396
commit
e7b883c427
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117137
@ -199,6 +199,7 @@ native_##var(void) \
|
|||||||
static char buf[1024]; \
|
static char buf[1024]; \
|
||||||
char **varp = &(var); \
|
char **varp = &(var); \
|
||||||
\
|
\
|
||||||
|
len = sizeof buf; \
|
||||||
if (sysctlbyname(name, &buf, &len, NULL,\
|
if (sysctlbyname(name, &buf, &len, NULL,\
|
||||||
0) == -1) \
|
0) == -1) \
|
||||||
err(1, "sysctlbyname");
|
err(1, "sysctlbyname");
|
||||||
|
Loading…
Reference in New Issue
Block a user