--- projects/libstatgrab/src/libstatgrab/tools.c 2003/10/19 00:09:22 1.7 +++ projects/libstatgrab/src/libstatgrab/tools.c 2003/10/19 00:25:30 1.8 @@ -27,6 +27,10 @@ #include #include #include +#ifdef FREEBSD +#include +#include +#endif #include "tools.h" @@ -62,5 +66,18 @@ long long get_ll_match(char *line, regmatch_t *match){ num=atoll(ptr); return num; +} +#endif + +#ifdef FREEBSD +kvm_t *get_kvm() { + static kvm_t *kvmd = NULL; + + if (kvmd != NULL) { + return kvmd; + } + + kvmd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, NULL); + return kvmd; } #endif