diff options
author | Araq <rumpf_a@web.de> | 2014-10-11 21:44:35 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-10-11 21:44:35 +0200 |
commit | 399c985b62b35e7d81149ceef5d9a51fdeac35ed (patch) | |
tree | c0e1b5207f37c580e5ac86eb11aabe334207137e /lib/pure | |
parent | 826d529256a51f15942685e6533faf5040605d18 (diff) | |
download | Nim-399c985b62b35e7d81149ceef5d9a51fdeac35ed.tar.gz |
fixes recent regression
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/concurrency/cpuinfo.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pure/concurrency/cpuinfo.nim b/lib/pure/concurrency/cpuinfo.nim index bd10a416f..8d7f28f8e 100644 --- a/lib/pure/concurrency/cpuinfo.nim +++ b/lib/pure/concurrency/cpuinfo.nim @@ -26,13 +26,16 @@ when defined(openbsd) or defined(netbsd): {.emit:"#include <sys/param.h>".} when defined(macosx) or defined(bsd): + # we HAVE to emit param.h before sysctl.h so we cannot use .header here + # either. The amount of archaic bullshit in Poonix based OSes is just insane. + {.emit:"#include <sys/sysctl.h>".} const CTL_HW = 6 HW_AVAILCPU = 25 HW_NCPU = 3 proc sysctl(x: ptr array[0..3, cint], y: cint, z: pointer, a: var csize, b: pointer, c: int): cint {. - importc: "sysctl", header: "<sys/sysctl.h>".} + importc: "sysctl", nodecl.} proc countProcessors*(): int {.rtl, extern: "ncpi$1".} = ## returns the numer of the processors/cores the machine has. |