summaryrefslogtreecommitdiff
path: root/lib/libc/gen/sysconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/sysconf.c')
-rw-r--r--lib/libc/gen/sysconf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c
index 3f39418f026..03becb59eec 100644
--- a/lib/libc/gen/sysconf.c
+++ b/lib/libc/gen/sysconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysconf.c,v 1.23 2015/09/12 14:56:50 guenther Exp $ */
+/* $OpenBSD: sysconf.c,v 1.24 2016/03/20 02:32:40 guenther Exp $ */
/*-
* Copyright (c) 1993
* The Regents of the University of California. All rights reserved.
@@ -131,6 +131,8 @@ sysconf(int name)
/* 1003.1b */
case _SC_PAGESIZE:
+ if (_pagesize != 0)
+ return (_pagesize);
mib[0] = CTL_HW;
mib[1] = HW_PAGESIZE;
break;