svn commit: r295079 - head/libexec/atrun
Garrett Cooper
ngie at FreeBSD.org
Sat Jan 30 17:54:19 UTC 2016
Author: ngie
Date: Sat Jan 30 17:54:18 2016
New Revision: 295079
URL: https://svnweb.freebsd.org/changeset/base/295079
Log:
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 at hauptsignal.at>
Submitted by: kib
Sponsored by: EMC / Isilon Storage Division
Modified:
head/libexec/atrun/atrun.c
Modified: head/libexec/atrun/atrun.c
==============================================================================
--- head/libexec/atrun/atrun.c Sat Jan 30 17:43:41 2016 (r295078)
+++ head/libexec/atrun/atrun.c Sat Jan 30 17:54:18 2016 (r295079)
@@ -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
More information about the svn-src-all
mailing list