diff options
author | davidxu <davidxu@FreeBSD.org> | 2011-06-16 02:22:24 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2011-06-16 02:22:24 +0000 |
commit | c3892e31fd026a47efa458c3a50440b64cb4e535 (patch) | |
tree | ef85a04d242a4c764ab638938b345c1c952686fc /lib/libc | |
parent | ce2f24436089bae3547ee960744d48d85ee436ab (diff) | |
download | FreeBSD-src-c3892e31fd026a47efa458c3a50440b64cb4e535.zip FreeBSD-src-c3892e31fd026a47efa458c3a50440b64cb4e535.tar.gz |
Use size of int to fetch sysctl kern.sched.cpusetsize because it had
switched from long to int type in kernel.
Fixed by: pluknet
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/gen/sysconf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index 7539d61..80ae626 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -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: |