From 99748250f2ae7c64c32c6a266054a2e6ddd6d8be Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 28 Sep 2011 00:53:37 +0200 Subject: [PATCH] unix: link to libkvm on freebsd Fixes 'undefined reference' linker errors to kvm_open(), kvm_close(), etc. --- config-unix.mk | 2 +- uv.gyp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config-unix.mk b/config-unix.mk index c8220c56..045987fe 100644 --- a/config-unix.mk +++ b/config-unix.mk @@ -70,7 +70,7 @@ ifeq (FreeBSD,$(uname_S)) EV_CONFIG=config_freebsd.h EIO_CONFIG=config_freebsd.h CPPFLAGS += -Isrc/ares/config_freebsd -LINKFLAGS+= +LINKFLAGS+=-lkvm OBJS += src/unix/freebsd.o OBJS += src/unix/kqueue.o endif diff --git a/uv.gyp b/uv.gyp index 4f2c225a..7a88cfa1 100644 --- a/uv.gyp +++ b/uv.gyp @@ -250,6 +250,11 @@ 'EV_CONFIG_H="config_freebsd.h"', 'EIO_CONFIG_H="config_freebsd.h"', ], + 'direct_dependent_settings': { + 'libraries': [ + '-lkvm', + ], + }, }], [ 'OS=="openbsd"', { 'include_dirs': [ 'src/ares/config_openbsd' ],