diff options
Diffstat (limited to 'lib/libc/gen/sysconf.c')
-rw-r--r-- | lib/libc/gen/sysconf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index 80ae626..b7952b1 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include <sys/resource.h> #include <sys/socket.h> +#include <elf.h> #include <errno.h> #include <limits.h> #include <paths.h> @@ -51,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include "../stdlib/atexit.h" #include "tzfile.h" /* from ../../../contrib/tzcode/stdtime */ +#include "libc_private.h" #define _PATH_ZONEINFO TZDIR /* from tzfile.h */ @@ -357,11 +359,7 @@ yesno: return (_POSIX_CLOCK_SELECTION); #endif case _SC_CPUTIME: -#if _POSIX_CPUTIME == 0 -#error "_POSIX_CPUTIME" -#else return (_POSIX_CPUTIME); -#endif #ifdef notdef case _SC_FILE_LOCKING: /* @@ -585,6 +583,8 @@ yesno: case _SC_NPROCESSORS_CONF: case _SC_NPROCESSORS_ONLN: + if (_elf_aux_info(AT_NCPUS, &value, sizeof(value)) == 0) + return ((long)value); mib[0] = CTL_HW; mib[1] = HW_NCPU; break; |