From 33162701fed1a87fcf8b60cc3eb73a369ae9f0e8 Mon Sep 17 00:00:00 2001 From: cathugger Date: Sun, 31 Mar 2019 19:26:53 +0000 Subject: [PATCH] glibc isn't limited to linux --- cpucount.c | 1 + main.c | 2 +- worker.c | 2 +- yaml.c | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cpucount.c b/cpucount.c index 32f32ff..74ed782 100644 --- a/cpucount.c +++ b/cpucount.c @@ -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; diff --git a/main.c b/main.c index 522a91b..f4ea80e 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -#ifdef __linux__ +#ifdef __GLIBC__ #define _POSIX_C_SOURCE 200112L #endif diff --git a/worker.c b/worker.c index fe4d606..db279b0 100644 --- a/worker.c +++ b/worker.c @@ -1,4 +1,4 @@ -#ifdef __linux__ +#ifdef __GLIBC__ #define _POSIX_C_SOURCE 200112L #endif diff --git a/yaml.c b/yaml.c index 6a16965..4649ac7 100644 --- a/yaml.c +++ b/yaml.c @@ -1,4 +1,4 @@ -#ifdef __linux__ +#ifdef __GLIBC__ #define _POSIX_C_SOURCE 200112L #endif