Browse Source

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>
Alexandru Ardelean 9 years ago
parent
commit
3c78eb04b8
2 changed files with 41 additions and 2 deletions
  1. 2
    2
      net/openvswitch/Makefile
  2. 39
    0
      net/openvswitch/patches/0004-musl-compatibility.patch

+ 2
- 2
net/openvswitch/Makefile View File

@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
11 11
 
12 12
 PKG_NAME:=openvswitch
13 13
 
14
-PKG_RELEASE:=2
14
+PKG_RELEASE:=3
15 15
 PKG_VERSION:=2.3.90
16 16
 PKG_RELEASE=$(PKG_SOURCE_VERSION)
17 17
 PKG_LICENSE:=Apache-2.0
@@ -54,7 +54,7 @@ endef
54 54
 define Package/openvswitch
55 55
   $(call Package/openvswitch/Default)
56 56
   TITLE:=Open vSwitch Userspace Package
57
-  DEPENDS:=+libpcap +libopenssl +librt +libatomic +kmod-openvswitch @($(SUPPORTED_KERNELS))
57
+  DEPENDS:=+libpcap +libopenssl +librt +kmod-openvswitch @($(SUPPORTED_KERNELS))
58 58
 endef
59 59
 
60 60
 define Package/openvswitch/description

+ 39
- 0
net/openvswitch/patches/0004-musl-compatibility.patch View File

@@ -0,0 +1,39 @@
1
+diff --git a/configure.ac b/configure.ac
2
+index 8d47eb9..69eeed8 100644
3
+--- a/configure.ac
4
++++ b/configure.ac
5
+@@ -117,7 +117,6 @@ OVS_CHECK_XENSERVER_VERSION
6
+ OVS_CHECK_GROFF
7
+ OVS_CHECK_GNU_MAKE
8
+ OVS_CHECK_TLS
9
+-OVS_CHECK_ATOMIC_LIBS
10
+ OVS_CHECK_GCC4_ATOMICS
11
+ OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(1)
12
+ OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(2)
13
+diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
14
+index 9b2e74f..70126bb 100644
15
+--- a/lib/netdev-linux.c
16
++++ b/lib/netdev-linux.c
17
+@@ -40,7 +40,9 @@
18
+ #include <netpacket/packet.h>
19
+ #include <net/if.h>
20
+ #include <net/if_arp.h>
21
++#if defined(__UCLIBC__) || defined(__GLIBC__)
22
+ #include <net/if_packet.h>
23
++#endif
24
+ #include <net/route.h>
25
+ #include <netinet/in.h>
26
+ #include <poll.h>
27
+diff --git a/lib/ovs-atomic.h b/lib/ovs-atomic.h
28
+index 9ead907..86d3341 100644
29
+--- a/lib/ovs-atomic.h
30
++++ b/lib/ovs-atomic.h
31
+@@ -325,8 +325,6 @@
32
+         #include "ovs-atomic-clang.h"
33
+     #elif HAVE_STDATOMIC_H
34
+         #include "ovs-atomic-c11.h"
35
+-    #elif __GNUC__ >= 4 && __GNUC_MINOR__ >= 7
36
+-        #include "ovs-atomic-gcc4.7+.h"
37
+     #elif __GNUC__ && defined(__x86_64__)
38
+         #include "ovs-atomic-x86_64.h"
39
+     #elif __GNUC__ && defined(__i386__)