mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-01-24 09:57:39 -03:00
glibc isn't limited to linux
This commit is contained in:
parent
f4567d7190
commit
33162701fe
4 changed files with 4 additions and 3 deletions
|
@ -124,6 +124,7 @@ int cpucount(void)
|
||||||
#endif
|
#endif
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
// try parsing /proc/cpuinfo
|
// try parsing /proc/cpuinfo
|
||||||
|
// NOTE seems cygwin can provide this too, idk if need tho
|
||||||
ncpu = parsecpuinfo();
|
ncpu = parsecpuinfo();
|
||||||
if (ncpu > 0)
|
if (ncpu > 0)
|
||||||
return ncpu;
|
return ncpu;
|
||||||
|
|
2
main.c
2
main.c
|
@ -1,4 +1,4 @@
|
||||||
#ifdef __linux__
|
#ifdef __GLIBC__
|
||||||
#define _POSIX_C_SOURCE 200112L
|
#define _POSIX_C_SOURCE 200112L
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
2
worker.c
2
worker.c
|
@ -1,4 +1,4 @@
|
||||||
#ifdef __linux__
|
#ifdef __GLIBC__
|
||||||
#define _POSIX_C_SOURCE 200112L
|
#define _POSIX_C_SOURCE 200112L
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
2
yaml.c
2
yaml.c
|
@ -1,4 +1,4 @@
|
||||||
#ifdef __linux__
|
#ifdef __GLIBC__
|
||||||
#define _POSIX_C_SOURCE 200112L
|
#define _POSIX_C_SOURCE 200112L
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue