From c62eb9de44361e621f542b79f201f67421ca2a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Z=CC=8Cilvinas=20Valinskas?= Date: Wed, 30 Apr 2014 23:11:48 +0300 Subject: [PATCH] osx: bmon v3.2 compiles and links MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Žilvinas Valinskas Signed-off-by: Thomas Graf --- configure.ac | 8 ++++++-- src/in_netlink.c | 3 +++ src/input.c | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 6e7cc8c..bd1724f 100644 --- a/configure.ac +++ b/configure.ac @@ -69,8 +69,12 @@ fi PKG_CHECK_MODULES([CONFUSE], [libconfuse], [], AC_MSG_ERROR([requires libconfuse])) -PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [], AC_MSG_ERROR([requires libnl3-dev])) -PKG_CHECK_MODULES([LIBNL_ROUTE], [libnl-route-3.0], [], AC_MSG_ERROR([requires libnl3-route])) +case ${target_os} in + linux*) + PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [], AC_MSG_ERROR([requires libnl3-dev])) + PKG_CHECK_MODULES([LIBNL_ROUTE], [libnl-route-3.0], [], AC_MSG_ERROR([requires libnl3-route])) + ;; +esac AC_CHECK_LIB(m, pow, [], AC_MSG_ERROR([requires libm])) diff --git a/src/in_netlink.c b/src/in_netlink.c index 67f4a83..64021f5 100644 --- a/src/in_netlink.c +++ b/src/in_netlink.c @@ -31,6 +31,8 @@ #include #include +#ifndef SYS_BSD + static int c_notc = 0; static struct element_group *grp; static struct bmon_module netlink_ops; @@ -866,3 +868,4 @@ static void __init netlink_init(void) { input_register(&netlink_ops); } +#endif diff --git a/src/input.c b/src/input.c index f4afac7..2c02bbd 100644 --- a/src/input.c +++ b/src/input.c @@ -44,8 +44,10 @@ static void activate_default(void) if (!input_subsys.s_nmod) { struct bmon_module *m; +#ifdef SYS_LINUX if (!input_set("netlink")) return; +#endif if (!input_set("proc")) return;