glibc isn't limited to linux

This commit is contained in:
cathugger
2019-03-31 19:26:53 +00:00
parent f4567d7190
commit 33162701fe
4 changed files with 4 additions and 3 deletions

View File

@@ -124,6 +124,7 @@ int cpucount(void)
#endif
#ifdef __linux__
// try parsing /proc/cpuinfo
// NOTE seems cygwin can provide this too, idk if need tho
ncpu = parsecpuinfo();
if (ncpu > 0)
return ncpu;

2
main.c
View File

@@ -1,4 +1,4 @@
#ifdef __linux__
#ifdef __GLIBC__
#define _POSIX_C_SOURCE 200112L
#endif

View File

@@ -1,4 +1,4 @@
#ifdef __linux__
#ifdef __GLIBC__
#define _POSIX_C_SOURCE 200112L
#endif

2
yaml.c
View File

@@ -1,4 +1,4 @@
#ifdef __linux__
#ifdef __GLIBC__
#define _POSIX_C_SOURCE 200112L
#endif