mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Add sysctlbyname() for MacOS
This commit is contained in:
parent
5c6877b02b
commit
181cd4cbe8
21 changed files with 193 additions and 35 deletions
|
@ -23,7 +23,7 @@ long __get_sysctl(int x, int y) {
|
|||
int value;
|
||||
int mib[2] = {x, y};
|
||||
size_t len = sizeof(value);
|
||||
if (sys_sysctl(mib, 2, &value, &len, 0, 0) != -1) {
|
||||
if (sysctl(mib, 2, &value, &len, 0, 0) != -1) {
|
||||
return value;
|
||||
} else {
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue