openvswitch: fix musl compatibility
Remove libatomic support from OVS: musl's libatomic seems incomplete. Conditionally compile <net/if_packet.h>. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
parent
b65d05a5ab
commit
3c78eb04b8
2 changed files with 41 additions and 2 deletions
|
@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=openvswitch
|
||||
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=2.3.90
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
|
@ -54,7 +54,7 @@ endef
|
|||
define Package/openvswitch
|
||||
$(call Package/openvswitch/Default)
|
||||
TITLE:=Open vSwitch Userspace Package
|
||||
DEPENDS:=+libpcap +libopenssl +librt +libatomic +kmod-openvswitch @($(SUPPORTED_KERNELS))
|
||||
DEPENDS:=+libpcap +libopenssl +librt +kmod-openvswitch @($(SUPPORTED_KERNELS))
|
||||
endef
|
||||
|
||||
define Package/openvswitch/description
|
||||
|
|
39
net/openvswitch/patches/0004-musl-compatibility.patch
Normal file
39
net/openvswitch/patches/0004-musl-compatibility.patch
Normal file
|
@ -0,0 +1,39 @@
|
|||
diff --git a/configure.ac b/configure.ac
|
||||
index 8d47eb9..69eeed8 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -117,7 +117,6 @@ OVS_CHECK_XENSERVER_VERSION
|
||||
OVS_CHECK_GROFF
|
||||
OVS_CHECK_GNU_MAKE
|
||||
OVS_CHECK_TLS
|
||||
-OVS_CHECK_ATOMIC_LIBS
|
||||
OVS_CHECK_GCC4_ATOMICS
|
||||
OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(1)
|
||||
OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(2)
|
||||
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
|
||||
index 9b2e74f..70126bb 100644
|
||||
--- a/lib/netdev-linux.c
|
||||
+++ b/lib/netdev-linux.c
|
||||
@@ -40,7 +40,9 @@
|
||||
#include <netpacket/packet.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_arp.h>
|
||||
+#if defined(__UCLIBC__) || defined(__GLIBC__)
|
||||
#include <net/if_packet.h>
|
||||
+#endif
|
||||
#include <net/route.h>
|
||||
#include <netinet/in.h>
|
||||
#include <poll.h>
|
||||
diff --git a/lib/ovs-atomic.h b/lib/ovs-atomic.h
|
||||
index 9ead907..86d3341 100644
|
||||
--- a/lib/ovs-atomic.h
|
||||
+++ b/lib/ovs-atomic.h
|
||||
@@ -325,8 +325,6 @@
|
||||
#include "ovs-atomic-clang.h"
|
||||
#elif HAVE_STDATOMIC_H
|
||||
#include "ovs-atomic-c11.h"
|
||||
- #elif __GNUC__ >= 4 && __GNUC_MINOR__ >= 7
|
||||
- #include "ovs-atomic-gcc4.7+.h"
|
||||
#elif __GNUC__ && defined(__x86_64__)
|
||||
#include "ovs-atomic-x86_64.h"
|
||||
#elif __GNUC__ && defined(__i386__)
|
Loading…
Reference in a new issue