From: Michael Lee Date: Tue, 20 Dec 2016 14:21:48 +0000 (-0800) Subject: Fix sysconf return type X-Git-Tag: v2017.03.06.00~177 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=219f48ef6f5fb7a32301fea19c361f6db12cb23c;p=folly.git 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 --- 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