]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fix clang linux compilation
authorSean Purcell <me@seanp.xyz>
Thu, 13 Apr 2017 21:06:40 +0000 (14:06 -0700)
committerSean Purcell <me@seanp.xyz>
Thu, 13 Apr 2017 21:06:40 +0000 (14:06 -0700)
programs/util.h

index 63cfa9647e6ad908e723a394cb6e8eae4c9a4f69..a50b5e55b6704f3c38b3388e59be719c376aedee 100644 (file)
@@ -601,7 +601,7 @@ UTIL_STATIC int UTIL_countPhysicalCores(void)
 
     if (numPhysicalCores != 0) return numPhysicalCores;
 
-    numPhysicalCores = sysconf(_SC_NPROCESSORS_ONLN);
+    numPhysicalCores = (int)sysconf(_SC_NPROCESSORS_ONLN);
     if (numPhysicalCores == -1) {
         /* value not queryable, fall back on 1 */
         return numPhysicalCores = 1;