Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jan 2016 17:54:18 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r295079 - head/libexec/atrun
Message-ID:  <201601301754.u0UHsIpj009255@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601301754.u0UHsIpj009255>