Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jun 2011 02:22:24 +0000 (UTC)
From:      David Xu <davidxu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r223136 - head/lib/libc/gen
Message-ID:  <201106160222.p5G2MOrQ008203@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davidxu
Date: Thu Jun 16 02:22:24 2011
New Revision: 223136
URL: http://svn.freebsd.org/changeset/base/223136

Log:
  Use size of int to fetch sysctl kern.sched.cpusetsize because it had
  switched from long to int type in kernel.
  
  Fixed by: pluknet

Modified:
  head/lib/libc/gen/sysconf.c

Modified: head/lib/libc/gen/sysconf.c
==============================================================================
--- head/lib/libc/gen/sysconf.c	Thu Jun 16 02:16:53 2011	(r223135)
+++ head/lib/libc/gen/sysconf.c	Thu Jun 16 02:22:24 2011	(r223136)
@@ -599,11 +599,11 @@ yesno:
 
 #ifdef _SC_CPUSET_SIZE
 	case _SC_CPUSET_SIZE:
-		len = sizeof(lvalue);
-		if (sysctlbyname("kern.sched.cpusetsize", &lvalue, &len, NULL,
+		len = sizeof(value);
+		if (sysctlbyname("kern.sched.cpusetsize", &value, &len, NULL,
 		    0) == -1)
 			return (-1);
-		return (lvalue);
+		return ((long)value);
 #endif
 
 	default:



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