diff options
-rw-r--r-- | support/xsysconf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/support/xsysconf.c b/support/xsysconf.c index 2607d3a..fce7795 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; |