From 4381ea23feb33831ebe889e30645e10cf7032530 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Thu, 25 Apr 2013 10:56:56 +0200 Subject: [PATCH] Fix cpu_count() on some platforms When we use sysconf(_SC_NPROCESSORS_ONLN) to get number of cores, we have to include sysconf library that is unistd.h Sometimes it happens to work just becuase unistd.h indirectly included by some other libraries, but not always. Reported and fixed by Eyal BD No functional change. --- src/platform.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform.h b/src/platform.h index 36494c13..ad02575b 100644 --- a/src/platform.h +++ b/src/platform.h @@ -40,6 +40,7 @@ typedef unsigned __int64 uint64_t; #else # include +# include // Used by sysconf(_SC_NPROCESSORS_ONLN) #endif #if !defined(_WIN32) && !defined(_WIN64) // Linux - Unix -- 2.39.2