summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--getconf/getconf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/getconf/getconf.c b/getconf/getconf.c
index 01265f1..fc707c6 100644
--- a/getconf/getconf.c
+++ b/getconf/getconf.c
@@ -322,6 +322,11 @@ const var_map_t sysconf_vars[] = {
#else /* NetBSD */
{ "_XOPEN_VERSION", _UNDEFINED_VARIABLE_ },
#endif
+#if defined(_SC_NPROCESSORS_ONLN)
+ { "_NPROCESSORS_ONLN", _SC_NPROCESSORS_ONLN },
+#else /* only available on Linux, Solaris, AIX, Mac OS X */
+ { "_NPROCESSORS_ONLN", _UNDEFINED_VARIABLE_ },
+#endif
{ "POSIX2_LINE_MAX", SHIMMY_POSIX2_LINE_MAX },
{ "INT_MAX", SHIMMY_INT_MAX }