From 219f48ef6f5fb7a32301fea19c361f6db12cb23c Mon Sep 17 00:00:00 2001 From: Michael Lee Date: Tue, 20 Dec 2016 06:21:48 -0800 Subject: [PATCH] Fix sysconf return type Summary: The sysconf return type is supposed to be long, not unsigned. Reviewed By: Orvid Differential Revision: D4350903 fbshipit-source-id: 29d86081bf75d123e76b831a669b0fd3936ce102 --- folly/detail/CacheLocality.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/detail/CacheLocality.cpp b/folly/detail/CacheLocality.cpp index b514c606..4603c1d5 100644 --- a/folly/detail/CacheLocality.cpp +++ b/folly/detail/CacheLocality.cpp @@ -43,7 +43,7 @@ static CacheLocality getSystemLocalityInfo() { } #endif - size_t numCpus = sysconf(_SC_NPROCESSORS_CONF); + long numCpus = sysconf(_SC_NPROCESSORS_CONF); if (numCpus <= 0) { // This shouldn't happen, but if it does we should try to keep // going. We are probably not going to be able to parse /sys on -- 2.34.1