svn commit: r223136 - head/lib/libc/gen

David Xu davidxu at FreeBSD.org
Thu Jun 16 02:22:25 UTC 2011


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:


More information about the svn-src-all mailing list