mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-29 17:34:34 +00:00
fix darwin/freebsd
This commit is contained in:
@@ -775,7 +775,7 @@ get_page_size :: proc() -> int {
|
||||
get_processor_thread_count :: proc() -> int {
|
||||
count : int = 0
|
||||
count_size := size_of(count)
|
||||
if _sysctlbyname("hw.logicalcpu", rawptr(count), rawptr(count_size), 0, 0) == 0 {
|
||||
if _sysctlbyname("hw.logicalcpu", &count, &count_size, nil, 0) == 0 {
|
||||
if count > 0 {
|
||||
return count
|
||||
}
|
||||
|
||||
@@ -706,7 +706,7 @@ get_page_size :: proc() -> int {
|
||||
get_processor_thread_count :: proc() -> int {
|
||||
count : int = 0
|
||||
count_size := size_of(count)
|
||||
if _sysctlbyname("hw.logicalcpu", rawptr(count), rawptr(count_size), 0, 0) == 0 {
|
||||
if _sysctlbyname("hw.logicalcpu", &count, &count_size, nil, 0) == 0 {
|
||||
if count > 0 {
|
||||
return count
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user