batctl: musl build fixes
[feed/routing.git] / batctl / patches / 0001-batctl-use-netinet-if_ether.h-instead-of-linux-if_et.patch
1 From 6423e3e5cdc1f79625dbf90ff6444b0ad8b02185 Mon Sep 17 00:00:00 2001
2 From: Alex Suykov <alex.suykov@gmail.com>
3 Date: Mon, 6 Apr 2015 17:29:13 +0300
4 Subject: [PATCH] batctl: use netinet/if_ether.h instead of linux/if_ether.h
5
6 musl does not allow including netinet/* and linux/* headers together.
7 batctl includes netinet/if_ether.h indirectly via net/ethernet.h,
8 so netinet/if_ether.h must be used instead of linux/if_ether.h.
9
10 Signed-off-by: Alex Suykov <alex.suykov at gmail.com>
11 Acked-by: Sven Eckelmann <sven@narfation.org>
12 Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
13 ---
14 ping.c | 2 +-
15 tcpdump.h | 2 +-
16 traceroute.c | 2 +-
17 3 files changed, 3 insertions(+), 3 deletions(-)
18
19 diff --git a/ping.c b/ping.c
20 index bdca222..7880a82 100644
21 --- a/ping.c
22 +++ b/ping.c
23 @@ -34,7 +34,7 @@
24 #include <stdint.h>
25 #include <sys/select.h>
26 #include <sys/time.h>
27 -#include <linux/if_ether.h>
28 +#include <netinet/if_ether.h>
29
30 #include "main.h"
31 #include "ping.h"
32 diff --git a/tcpdump.h b/tcpdump.h
33 index 5d936f2..3c9126c 100644
34 --- a/tcpdump.h
35 +++ b/tcpdump.h
36 @@ -23,7 +23,7 @@
37 #define _BATCTL_TCPDUMP_H
38
39 #include <netpacket/packet.h>
40 -#include <linux/if_ether.h>
41 +#include <netinet/if_ether.h>
42 #include <net/if_arp.h>
43 #include <sys/types.h>
44 #include "main.h"
45 diff --git a/traceroute.c b/traceroute.c
46 index 4ebfec2..373fe90 100644
47 --- a/traceroute.c
48 +++ b/traceroute.c
49 @@ -22,13 +22,13 @@
50
51
52 #include <netinet/in.h>
53 +#include <netinet/if_ether.h>
54 #include <errno.h>
55 #include <stdio.h>
56 #include <stdlib.h>
57 #include <unistd.h>
58 #include <fcntl.h>
59 #include <string.h>
60 -#include <linux/if_ether.h>
61 #include <stddef.h>
62 #include <sys/select.h>
63 #include <sys/time.h>
64 --
65 2.1.4
66