From c80554be16f51b908229ed345df81b760ffd4dd4 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 30 Apr 2015 11:27:24 +0200 Subject: [PATCH] Explicitly include linux/if.h to fix cross-compile error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When compiling bmon with the Linaro 2014.01 ARM toolchain (gcc-linaro-arm-linux-gnueabihf-4.8-2014.01_linux) the following compile error occurs: in_netlink.c: In function ‘do_link’: in_netlink.c:688:53: error: ‘IFF_UP’ undeclared (first use in this function) Fix it by explicitly including linux/if.h, where IFF_UP is defined. Signed-off-by: Tobias Klauser --- src/in_netlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/in_netlink.c b/src/in_netlink.c index 7762592..8dd74fe 100644 --- a/src/in_netlink.c +++ b/src/in_netlink.c @@ -37,6 +37,8 @@ static int c_notc = 0; static struct element_group *grp; static struct bmon_module netlink_ops; +#include + #include #include #include