mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-12-16 04:54:51 +00:00
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 <ncopa@alpinelinux.org>
This commit is contained in:
parent
6e2e5ec28b
commit
dd9cc0ee81
@ -20,6 +20,7 @@
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/neighbour.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "libnetlink.h"
|
||||
#include "br_common.h"
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define _LNSTAT_H
|
||||
|
||||
#include <limits.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
#define LNSTAT_VERSION "0.02 041002"
|
||||
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <linux/filter.h>
|
||||
#include <linux/if.h>
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <math.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
#include <syslog.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/param.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <string.h>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user