diff options
Diffstat (limited to 'meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch')
-rw-r--r-- | meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch b/meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch new file mode 100644 index 000000000..75180fe32 --- /dev/null +++ b/meta-networking/recipes-protocols/openflow/openflow/0002-lib-netdev-Adjust-header-include-sequence.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From 5bba224edea38607e8732081f86679ffd8b218ab Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 20 Jul 2017 04:29:04 -0700 | ||
4 | Subject: [PATCH 2/2] lib/netdev: Adjust header include sequence | ||
5 | |||
6 | Specify libc headers before kernel UAPIs | ||
7 | this helps compiling with musl where otherwise | ||
8 | it uses the definition from kernel and complains | ||
9 | about double definition in libc headers | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | lib/netdev.c | 11 +++++------ | ||
14 | 1 file changed, 5 insertions(+), 6 deletions(-) | ||
15 | |||
16 | diff --git a/lib/netdev.c b/lib/netdev.c | ||
17 | index 3b6fbc5..c7de25e 100644 | ||
18 | --- a/lib/netdev.c | ||
19 | +++ b/lib/netdev.c | ||
20 | @@ -39,7 +39,6 @@ | ||
21 | #include <fcntl.h> | ||
22 | #include <arpa/inet.h> | ||
23 | #include <inttypes.h> | ||
24 | -#include <linux/if_tun.h> | ||
25 | |||
26 | /* Fix for some compile issues we were experiencing when setting up openwrt | ||
27 | * with the 2.4 kernel. linux/ethtool.h seems to use kernel-style inttypes, | ||
28 | @@ -57,10 +56,6 @@ | ||
29 | #define s64 __s64 | ||
30 | #endif | ||
31 | |||
32 | -#include <linux/ethtool.h> | ||
33 | -#include <linux/rtnetlink.h> | ||
34 | -#include <linux/sockios.h> | ||
35 | -#include <linux/version.h> | ||
36 | #include <sys/types.h> | ||
37 | #include <sys/ioctl.h> | ||
38 | #include <sys/socket.h> | ||
39 | @@ -68,12 +63,16 @@ | ||
40 | #include <net/ethernet.h> | ||
41 | #include <net/if.h> | ||
42 | #include <net/if_arp.h> | ||
43 | -#include <net/if_packet.h> | ||
44 | #include <net/route.h> | ||
45 | #include <netinet/in.h> | ||
46 | #include <stdlib.h> | ||
47 | #include <string.h> | ||
48 | #include <unistd.h> | ||
49 | +#include <linux/ethtool.h> | ||
50 | +#include <linux/rtnetlink.h> | ||
51 | +#include <linux/sockios.h> | ||
52 | +#include <linux/version.h> | ||
53 | +#include <linux/if_tun.h> | ||
54 | |||
55 | #include "fatal-signal.h" | ||
56 | #include "list.h" | ||
57 | -- | ||
58 | 2.13.3 | ||
59 | |||