Created attachment 195818 [details]
FreeBSD unlike Linux (GNU libc), Solaris, NetBSD, OpenBSD, etc. has _SC_NPROCESSORS_ONLN being a synonym for _SC_NPROCESSORS_CONF. Also affects /sys/devices/system/cpu/cpu%d/online in linsysfs.
Created attachment 195819 [details]
(In reply to Jan Beich from comment #1)
The libc part of the patch looks fine, please commit it.
The linsysfs better use CPU_FOREACH().