openvswitch: Fix build with musl libc
PATCH 1/1 openvswitch: Fix build with musl libc
From: Khem Raj <[email protected]>
Signed-off-by Khem Raj <[email protected]>
Signed-off-by Bruce Ashfield <[email protected]>
(cherry picked from commit 1b83c21436b2aec10e7b604ee5e3905441d1bb8a)
Signed-off-by Andre McCurdy <[email protected]>
--- ...-the-linux-if_packet.h-Interface-directly.patch | 35 ++++++++++++++++++++++ ...Define-WAIT_ANY-if-not-provided-by-system.patch | 31 +++++++++++++++++++ recipes-networking/openvswitch/openvswitch_git.bb | 2 ++ 3 files changed, 68 insertions(+) create mode 100644 recipes-networking/openvswitch/openvswitch-git/0001-use-the-linux-if_packet.h-Interface-directly.patch create mode 100644 recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch
recipes-networking/openvswitch/openvswitch-git/0001-use-the-linux-if_packet.h-Interface-directly.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 1cec65e45f011c3f52eed5e27d3d816502e36610 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 20 Mar 2017 12:12:51 -0700 +Subject: [PATCH 1/2] use the linux if_packet.h Interface directly + +Helps compiling with musl + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/netdev-linux.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c +index a5a9ec1ab..9dd40acdd 100644 +--- a/lib/netdev-linux.c ++++ b/lib/netdev-linux.c +@@ -33,14 +33,13 @@ + #include <linux/pkt_sched.h> + #include <linux/rtnetlink.h> + #include <linux/sockios.h> ++#include <linux/if_packet.h> + #include <sys/types.h> + #include <sys/ioctl.h> + #include <sys/socket.h> + #include <sys/utsname.h> +-#include <netpacket/packet.h> + #include <net/if.h> + #include <net/if_arp.h> +-#include <net/if_packet.h> + #include <net/route.h> + #include <netinet/in.h> + #include <poll.h> +-- +2.12.0 +
recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 803bde12d32d16eefeae03422a0ac682e0601c43 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 20 Mar 2017 12:13:30 -0700 +Subject: [PATCH 2/2] Define WAIT_ANY if not provided by system + +POSIX does not define it and uses -1 directly +some libc do not have this definitions + +Signed-off-by: Khem Raj <[email protected]> +--- + tests/test-ovn.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests/test-ovn.c b/tests/test-ovn.c +index 2e82a6f0d..76e7db9fb 100644 +--- a/tests/test-ovn.c ++++ b/tests/test-ovn.c +@@ -37,6 +37,10 @@ + #include "simap.h" + #include "util.h" + ++#ifndef WAIT_ANY ++# define WAIT_ANY (-1) /* Any process. */ ++#endif ++ + /* --relops: Bitmap of the relational operators to test, in exhaustive test. */ + static unsigned int test_relops; + +-- +2.12.0 +
recipes-networking/openvswitch/openvswitch_git.bb +2 -0
@@ -25,6 +25,8 @@ SRC_URI += "\ file://disable_m4_check.patch \ file://kernel_module.patch \ file://openvswitch-ptest-Fix-python-path.patch \ + file://0001-use-the-linux-if_packet.h-Interface-directly.patch \ + file://0002-Define-WAIT_ANY-if-not-provided-by-system.patch \ " LIC_FILES_CHKSUM = "file://COPYING;md5=247d8817aece26b21a8cd6791b3ea994"
Signature · 1 line
1.9.1
Bruce Ashfield
Appliedmerged to morty.
Bruce
Quoted 106 lines · Andre McCurdy
From: Khem Raj <[email protected]>
Signed-off-by Khem Raj <[email protected]>Signed-off-by Bruce Ashfield <[email protected]>(cherry picked from commit 1b83c21436b2aec10e7b604ee5e3905441d1bb8a)Signed-off-by Andre McCurdy <[email protected]>--- ...-the-linux-if_packet.h-Interface-directly.patch | 35 ++++++++++++++++++++++ ...Define-WAIT_ANY-if-not-provided-by-system.patch | 31 +++++++++++++++++++ recipes-networking/openvswitch/openvswitch_git.bb | 2 ++ 3 files changed, 68 insertions(+)create mode 100644
recipes-networking/openvswitch/openvswitch-git/0001-use-the-linux-if_packet.h-Interface-directly.patchcreate mode 100644recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patchrecipes-networking/openvswitch/openvswitch-git/0001-use-the-linux-if_packet.h-Interface-directly.patch new file +35
-0@@ -0,0 +1,35 @@ +From 1cec65e45f011c3f52eed5e27d3d816502e36610 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 20 Mar 2017 12:12:51 -0700 +Subject: [PATCH 1/2] use the linux if_packet.h Interface directly + +Helps compiling with musl + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/netdev-linux.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c +index a5a9ec1ab..9dd40acdd 100644 +--- a/lib/netdev-linux.c ++++ b/lib/netdev-linux.c +@@ -33,14 +33,13 @@ + #include <linux/pkt_sched.h> + #include <linux/rtnetlink.h> + #include <linux/sockios.h> ++#include <linux/if_packet.h> + #include <sys/types.h> + #include <sys/ioctl.h> + #include <sys/socket.h> + #include <sys/utsname.h> +-#include <netpacket/packet.h> + #include <net/if.h> + #include <net/if_arp.h> +-#include <net/if_packet.h> + #include <net/route.h> + #include <netinet/in.h> + #include <poll.h> +-- +2.12.0 +recipes-networking/openvswitch/openvswitch-git/0002-Define-WAIT_ANY-if-not-provided-by-system.patch new file +31
-0@@ -0,0 +1,31 @@ +From 803bde12d32d16eefeae03422a0ac682e0601c43 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 20 Mar 2017 12:13:30 -0700 +Subject: [PATCH 2/2] Define WAIT_ANY if not provided by system + +POSIX does not define it and uses -1 directly +some libc do not have this definitions + +Signed-off-by: Khem Raj <[email protected]> +--- + tests/test-ovn.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/tests/test-ovn.c b/tests/test-ovn.c +index 2e82a6f0d..76e7db9fb 100644 +--- a/tests/test-ovn.c ++++ b/tests/test-ovn.c +@@ -37,6 +37,10 @@ + #include "simap.h" + #include "util.h" + ++#ifndef WAIT_ANY ++# define WAIT_ANY (-1) /* Any process. */ ++#endif ++ + /* --relops: Bitmap of the relational operators to test, in exhaustive test. */ + static unsigned int test_relops; + +-- +2.12.0 +recipes-networking/openvswitch/openvswitch_git.bb +2
-0@@ -25,6 +25,8 @@ SRC_URI += "\ file://disable_m4_check.patch \ file://kernel_module.patch \ file://openvswitch-ptest-Fix-python-path.patch \ + file://0001-use-the-linux-if_packet.h-Interface-directly.patch \ + file://0002-Define-WAIT_ANY-if-not-provided-by-system.patch \ " LIC_FILES_CHKSUM = "file://COPYING;md5=247d8817aece26b21a8cd6791b3ea994"