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

Sergey Kandaurov pluknet at freebsd.org
Thu Jun 16 07:05:58 UTC 2011


On 16 June 2011 06:22, David Xu <davidxu at freebsd.org> wrote:
> 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:
>

Thanks!

-- 
wbr,
pluknet


More information about the svn-src-all mailing list