mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
Add sysctlbyname() for MacOS
This commit is contained in:
parent
5c6877b02b
commit
181cd4cbe8
21 changed files with 193 additions and 35 deletions
|
@ -53,7 +53,7 @@ static dontinline int __clk_tck_init(void) {
|
|||
cmd[0] = 1; // CTL_KERN
|
||||
cmd[1] = 12; // KERN_CLOCKRATE
|
||||
len = sizeof(clock);
|
||||
if (sys_sysctl(cmd, 2, &clock, &len, NULL, 0) != -1) {
|
||||
if (sysctl(cmd, 2, &clock, &len, NULL, 0) != -1) {
|
||||
x = clock.hz;
|
||||
} else {
|
||||
x = -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue