Fix the type for hw.ncpu, so sysctlbyname doesn't consistently fail on
64-bit architectures where sizeof(int) != sizeof(size_t). MFC after: 1 week PR: 206758 Reported by: Christoph Schönweiler <public2016@hauptsignal.at> Submitted by: kib Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
5322a0968e
commit
565379b6b6
@ -459,8 +459,9 @@ main(int argc, char *argv[])
|
||||
int c;
|
||||
int run_batch;
|
||||
#ifdef __FreeBSD__
|
||||
size_t ncpu, ncpusz;
|
||||
size_t ncpusz;
|
||||
double load_avg = -1;
|
||||
int ncpu;
|
||||
#else
|
||||
double load_avg = LOADAVG_MX;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user