From: Natanael Copa Date: Tue, 27 May 2014 07:40:10 +0000 (+0000) Subject: iproute2: various header include fixes for compiling with musl libc X-Git-Tag: v3.15.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd9cc0ee81a670619d3cb713c98a90abb4cf41d3;p=thirdparty%2Fiproute2.git iproute2: various header include fixes for compiling with musl libc We need limits.h for LONG_MIN and LONG_MAX, sys/param.h for MIN and sys/select for struct timeval. This fixes the following compile errors with musl libc: f_bpf.c: In function 'bpf_parse_opt': f_bpf.c:181:12: error: 'LONG_MIN' undeclared (first use in this function) if (h == LONG_MIN || h == LONG_MAX) { ^ ... tc_util.o: In function `print_tcstats2_attr': tc_util.c:(.text+0x13fe): undefined reference to `MIN' tc_util.c:(.text+0x1465): undefined reference to `MIN' tc_util.c:(.text+0x14ce): undefined reference to `MIN' tc_util.c:(.text+0x154c): undefined reference to `MIN' tc_util.c:(.text+0x160a): undefined reference to `MIN' tc_util.o:tc_util.c:(.text+0x174e): more undefined references to `MIN' follow ... tc_stab.o: In function `print_size_table': tc_stab.c:(.text+0x40f): undefined reference to `MIN' ... fdb.c:247:30: error: 'ULONG_MAX' undeclared (first use in this function) (vni >> 24) || vni == ULONG_MAX) ^ lnstat.h:28:17: error: field 'last_read' has incomplete type struct timeval last_read; /* last time of read */ ^ Signed-off-by: Natanael Copa --- diff --git a/bridge/fdb.c b/bridge/fdb.c index 9b720e30f..336cf9d7b 100644 --- a/bridge/fdb.c +++ b/bridge/fdb.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "libnetlink.h" #include "br_common.h" diff --git a/misc/lnstat.h b/misc/lnstat.h index 06774ab3d..83dad9703 100644 --- a/misc/lnstat.h +++ b/misc/lnstat.h @@ -2,6 +2,7 @@ #define _LNSTAT_H #include +#include #define LNSTAT_VERSION "0.02 041002" diff --git a/tc/f_bpf.c b/tc/f_bpf.c index d52d7d8ec..8f1593c9a 100644 --- a/tc/f_bpf.c +++ b/tc/f_bpf.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include diff --git a/tc/tc_stab.c b/tc/tc_stab.c index 47b4e5e35..a8404f8eb 100644 --- a/tc/tc_stab.c +++ b/tc/tc_stab.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/tc/tc_util.c b/tc/tc_util.c index 15fb05344..f1fca0a8b 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include