build,openbsd: remove kvm-related code

Remove the kvm.h include since 38323c9fb replaced the use of kvm_open()
with sysctl(),

Conditionally check for kvm_open() on non-OpenBSD platforms so LIBS (and
libuv.pc) does not unnecessarily contain "-lkvm".

Fixes: https://github.com/libuv/libuv/issues/1340
PR-URL: https://github.com/libuv/libuv/pull/1344
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit is contained in:
James McCoy 2017-05-12 23:25:06 -04:00 committed by Santiago Gimeno
parent 1217832e6f
commit 22fc92856d
No known key found for this signature in database
GPG Key ID: F28C3C8DA33C03BE
2 changed files with 3 additions and 2 deletions

View File

@ -43,7 +43,6 @@ LT_INIT
# TODO(bnoordhuis) Check for -pthread vs. -pthreads
AC_CHECK_LIB([dl], [dlopen])
AC_CHECK_LIB([kstat], [kstat_lookup])
AC_CHECK_LIB([kvm], [kvm_open])
AC_CHECK_LIB([nsl], [gethostbyname])
AC_CHECK_LIB([perfstat], [perfstat_cpu])
AC_CHECK_LIB([pthread], [pthread_mutex_init])
@ -65,6 +64,9 @@ AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])
AS_CASE([$host_os],[mingw*], [
LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv -luser32"
])
AS_CASE([$host_os], [openbsd*], [], [
AC_CHECK_LIB([kvm], [kvm_open])
])
AC_CHECK_HEADERS([sys/ahafs_evProds.h])
AC_CHECK_PROG(PKG_CONFIG, pkg-config, yes)
AM_CONDITIONAL([HAVE_PKG_CONFIG], [test "x$PKG_CONFIG" != "x"])

View File

@ -30,7 +30,6 @@
#include <errno.h>
#include <fcntl.h>
#include <kvm.h>
#include <paths.h>
#include <stdlib.h>
#include <string.h>