about summary refs log tree commit diff
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/xsysconf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/support/xsysconf.c b/support/xsysconf.c
index 2607d3a720..fce7795417 100644
--- a/support/xsysconf.c
+++ b/support/xsysconf.c
@@ -29,7 +29,7 @@ xsysconf (int name)
   int old_errno = errno;
   errno = 0;
   long result = sysconf (name);
-  if (errno != 0)
+  if (result == -1 && errno != 0)
     FAIL_EXIT1 ("sysconf (%d): %m", name);
   errno = old_errno;
   return result;