diff options
Diffstat (limited to 'lib/libc/gen/sysconf.c')
-rw-r--r-- | lib/libc/gen/sysconf.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index f02faa5c01c..7e8d2ca6569 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysconf.c,v 1.18 2013/03/24 20:04:35 guenther Exp $ */ +/* $OpenBSD: sysconf.c,v 1.19 2014/04/08 14:04:11 mpi Exp $ */ /*- * Copyright (c) 1993 * The Regents of the University of California. All rights reserved. @@ -36,9 +36,10 @@ #include <sys/sysctl.h> #include <sys/time.h> #include <sys/resource.h> -#include <sys/vmmeter.h> #include <sys/socket.h> +#include <uvm/uvm_extern.h> + #include <errno.h> #include <grp.h> #include <pthread.h> @@ -444,14 +445,14 @@ sysconf(int name) } case _SC_AVPHYS_PAGES: { - struct vmtotal vmtotal; + struct uvmexp uvmexp; mib[0] = CTL_VM; - mib[1] = VM_METER; - len = sizeof(vmtotal); - if (sysctl(mib, namelen, &vmtotal, &len, NULL, 0) == -1) + mib[1] = VM_UVMEXP; + len = sizeof(uvmexp); + if (sysctl(mib, namelen, &uvmexp, &len, NULL, 0) == -1) return (-1); - return (vmtotal.t_free); + return (uvmexp.free); } case _SC_NPROCESSORS_CONF: |