diff options
| author | Khem Raj <raj.khem@gmail.com> | 2017-10-25 21:24:00 -0700 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2017-10-27 10:32:30 -0400 |
| commit | dfe24c5b5ac39f38fd2ac7370cca441cb47c31bc (patch) | |
| tree | 05e8bf5637750c0d79b623b1da115c923b0617bd | |
| parent | 877379ff111931ea71f8ee47452934a6d649d790 (diff) | |
| download | meta-virtualization-dfe24c5b5ac39f38fd2ac7370cca441cb47c31bc.tar.gz | |
openvswitch: Fix build with musl libc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
(cherry picked from commit 1b83c21436b2aec10e7b604ee5e3905441d1bb8a)
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
3 files changed, 68 insertions, 0 deletions
diff --git a/recipes-networking/openvswitch/openvswitch-git/0001-use-the-linux-if_packet.h-Interface-directly.patch b/recipes-networking/openvswitch/openvswitch-git/0001-use-the-linux-if_packet.h-Interface-directly.patch new file mode 100644 index 00000000..35712452 --- /dev/null +++ b/recipes-networking/openvswitch/openvswitch-git/0001-use-the-linux-if_packet.h-Interface-directly.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From 1cec65e45f011c3f52eed5e27d3d816502e36610 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 20 Mar 2017 12:12:51 -0700 | ||
| 4 | Subject: [PATCH 1/2] use the linux if_packet.h Interface directly | ||
| 5 | |||
| 6 | Helps compiling with musl | ||
| 7 | |||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | --- | ||
| 10 | lib/netdev-linux.c | 3 +-- | ||
| 11 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c | ||
| 14 | index a5a9ec1ab..9dd40acdd 100644 | ||
| 15 | --- a/lib/netdev-linux.c | ||
| 16 | +++ b/lib/netdev-linux.c | ||
| 17 | @@ -33,14 +33,13 @@ | ||
| 18 | #include <linux/pkt_sched.h> | ||
| 19 | #include <linux/rtnetlink.h> | ||
| 20 | #include <linux/sockios.h> | ||
| 21 | +#include <linux/if_packet.h> | ||
| 22 | #include <sys/types.h> | ||
| 23 | #include <sys/ioctl.h> | ||
| 24 | #include <sys/socket.h> | ||
| 25 | #include <sys/utsname.h> | ||
| 26 | -#include <netpacket/packet.h> | ||
| 27 | #include <net/if.h> | ||
| 28 | #include <net/if_arp.h> | ||
| 29 | -#include <net/if_packet.h> | ||
| 30 | #include <net/route.h> | ||
| 31 | #include <netinet/in.h> | ||
| 32 | #include <poll.h> | ||
| 33 | -- | ||
| 34 | 2.12.0 | ||
| 35 | |||
diff --git a/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch b/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch new file mode 100644 index 00000000..e44ffdaf --- /dev/null +++ b/recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From 803bde12d32d16eefeae03422a0ac682e0601c43 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 20 Mar 2017 12:13:30 -0700 | ||
| 4 | Subject: [PATCH 2/2] Define WAIT_ANY if not provided by system | ||
| 5 | |||
| 6 | POSIX does not define it and uses -1 directly | ||
| 7 | some libc do not have this definitions | ||
| 8 | |||
| 9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 10 | --- | ||
| 11 | tests/test-ovn.c | 4 ++++ | ||
| 12 | 1 file changed, 4 insertions(+) | ||
| 13 | |||
| 14 | diff --git a/tests/test-ovn.c b/tests/test-ovn.c | ||
| 15 | index 2e82a6f0d..76e7db9fb 100644 | ||
| 16 | --- a/tests/test-ovn.c | ||
| 17 | +++ b/tests/test-ovn.c | ||
| 18 | @@ -37,6 +37,10 @@ | ||
| 19 | #include "simap.h" | ||
| 20 | #include "util.h" | ||
| 21 | |||
| 22 | +#ifndef WAIT_ANY | ||
| 23 | +# define WAIT_ANY (-1) /* Any process. */ | ||
| 24 | +#endif | ||
| 25 | + | ||
| 26 | /* --relops: Bitmap of the relational operators to test, in exhaustive test. */ | ||
| 27 | static unsigned int test_relops; | ||
| 28 | |||
| 29 | -- | ||
| 30 | 2.12.0 | ||
| 31 | |||
diff --git a/recipes-networking/openvswitch/openvswitch_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb index 1c6252a9..5ecb29ae 100644 --- a/recipes-networking/openvswitch/openvswitch_git.bb +++ b/recipes-networking/openvswitch/openvswitch_git.bb | |||
| @@ -25,6 +25,8 @@ SRC_URI += "\ | |||
| 25 | file://disable_m4_check.patch \ | 25 | file://disable_m4_check.patch \ |
| 26 | file://kernel_module.patch \ | 26 | file://kernel_module.patch \ |
| 27 | file://openvswitch-ptest-Fix-python-path.patch \ | 27 | file://openvswitch-ptest-Fix-python-path.patch \ |
| 28 | file://0001-use-the-linux-if_packet.h-Interface-directly.patch \ | ||
| 29 | file://0002-Define-WAIT_ANY-if-not-provided-by-system.patch \ | ||
| 28 | " | 30 | " |
| 29 | 31 | ||
| 30 | LIC_FILES_CHKSUM = "file://COPYING;md5=247d8817aece26b21a8cd6791b3ea994" | 32 | LIC_FILES_CHKSUM = "file://COPYING;md5=247d8817aece26b21a8cd6791b3ea994" |
