Add sysctlbyname() for MacOS

This commit is contained in:
Justine Tunney 2024-05-02 23:21:43 -07:00
parent 5c6877b02b
commit 181cd4cbe8
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
21 changed files with 193 additions and 35 deletions

View file

@ -51,7 +51,7 @@ static int __get_cpu_count_bsd(void) {
} else {
cmd[1] = HW_NCPU;
}
if (!sys_sysctl(cmd, 2, &c, &n, 0, 0)) {
if (!sysctl(cmd, 2, &c, &n, 0, 0)) {
return c;
} else {
return -1;