--- projects/libstatgrab/src/libstatgrab/tools.c 2004/02/16 14:55:32 1.31 +++ projects/libstatgrab/src/libstatgrab/tools.c 2004/03/17 11:58:18 1.32 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA * 02111-1307 USA * - * $Id: tools.c,v 1.31 2004/02/16 14:55:32 tdb Exp $ + * $Id: tools.c,v 1.32 2004/03/17 11:58:18 ats Exp $ */ #ifdef HAVE_CONFIG_H @@ -464,6 +464,16 @@ int statgrab_init(){ { kvm_t *kvmd = get_kvm(); if (kvmd == NULL) return 1; + } +#endif +#if defined(NETBSD) || defined(OPENBSD) + { + /* This should always succeed, but it seems that on some + * versions of NetBSD the first call to get_uvmexp will return + * a non-filled-in structure; this is a workaround for that. + */ + struct uvmexp *uvm = get_uvmexp(); + if (uvm == NULL) return 1; } #endif #ifdef SOLARIS