net-libs/onion: Fix build with some useflags combination, bug #621864
authorAlexis Ballier <aballier@gentoo.org>
Fri, 16 Jun 2017 07:47:47 +0000 (09:47 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Fri, 16 Jun 2017 07:54:43 +0000 (09:54 +0200)
Package-Manager: Portage-2.3.6, Repoman-2.3.2

net-libs/onion/files/protos.patch [new file with mode: 0644]
net-libs/onion/onion-0.8.ebuild

diff --git a/net-libs/onion/files/protos.patch b/net-libs/onion/files/protos.patch
new file mode 100644 (file)
index 0000000..59050a9
--- /dev/null
@@ -0,0 +1,28 @@
+Prototypes do not match, fixes some build failures.
+
+Index: onion-0.8/src/onion/poller_libev.c
+===================================================================
+--- onion-0.8.orig/src/onion/poller_libev.c
++++ onion-0.8/src/onion/poller_libev.c
+@@ -75,7 +75,7 @@ void onion_poller_slot_set_timeout(onion
+       el->timeout=timeout_ms;
+ }
+ /// Sets the polling type: read/write/other. O_POLL_READ | O_POLL_WRITE | O_POLL_OTHER
+-void onion_poller_slot_set_type(onion_poller_slot *el, int type){
++void onion_poller_slot_set_type(onion_poller_slot *el, onion_poller_slot_type_e type){
+       el->type=0;
+       if (type&O_POLL_READ)
+               el->type|=EV_READ;
+Index: onion-0.8/src/onion/poller_libevent.c
+===================================================================
+--- onion-0.8.orig/src/onion/poller_libevent.c
++++ onion-0.8/src/onion/poller_libevent.c
+@@ -77,7 +77,7 @@ void onion_poller_slot_set_timeout(onion
+       el->timeout=timeout_ms;
+ }
+ /// Sets the polling type: read/write/other. O_POLL_READ | O_POLL_WRITE | O_POLL_OTHER
+-void onion_poller_slot_set_type(onion_poller_slot *el, int type){
++void onion_poller_slot_set_type(onion_poller_slot *el, onion_poller_slot_type_e type){
+       el->type=EV_PERSIST;
+       if (type&O_POLL_READ)
+               el->type|=EV_READ;
index e815359b103587dc49edf71ee04512f6c08e0418..c1b092d061422a7a0779136595132ac684d9a121 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -48,6 +48,8 @@ DEPEND="${RDEPEND}
 "
 REQUIRED_USE="test? ( examples )"
 
+PATCHES=( "${FILESDIR}/protos.patch" )
+
 src_configure() {
        use test || echo '' > tests/CMakeLists.txt
        local mycmakeargs=(