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:
Enji Cooper 2016-01-30 17:54:18 +00:00
parent 5322a0968e
commit 565379b6b6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295079

View File

@ -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