commit:     e0f6588a69a4660646663a71dc0436cb3f8db2e0
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  3 13:15:57 2021 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Oct  3 13:15:57 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0f6588a

net-libs/libupnp: fix compilation with glibc-2.34

Closes: https://bugs.gentoo.org/806610
Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../libupnp/files/libupnp-1.14.7-glibc-2.34.patch  | 32 ++++++++++++++++++++++
 net-libs/libupnp/libupnp-1.14.7.ebuild             |  5 ++--
 2 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/net-libs/libupnp/files/libupnp-1.14.7-glibc-2.34.patch 
b/net-libs/libupnp/files/libupnp-1.14.7-glibc-2.34.patch
new file mode 100644
index 00000000000..dbcfd5e2cc2
--- /dev/null
+++ b/net-libs/libupnp/files/libupnp-1.14.7-glibc-2.34.patch
@@ -0,0 +1,32 @@
+--- a/upnp/inc/ithread.h
++++ b/upnp/inc/ithread.h
+@@ -304,12 +304,8 @@
+  *      Returns EINVAL if the kind is not supported.
+  *      See man page for pthread_mutexattr_setkind_np
+  
*****************************************************************************/
+-#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__)
+-      #define ithread_mutexattr_setkind_np pthread_mutexattr_settype
+-#else
+-      #define ithread_mutexattr_setkind_np pthread_mutexattr_setkind_np
+-#endif /* UPNP_USE_RWLOCK */
+-
++#define ithread_mutexattr_setkind_np pthread_mutexattr_settype
++#define ithread_mutexattr_settype pthread_mutexattr_settype
+ /****************************************************************************
+  * Function: ithread_mutexattr_getkind_np
+  *
+@@ -329,12 +325,8 @@
+  *      Always returns 0.
+  *      See man page for pthread_mutexattr_getkind_np
+  
*****************************************************************************/
+-#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__)
+-      #define ithread_mutexattr_getkind_np pthread_mutexattr_gettype
+-#else
+-      #define ithread_mutexattr_getkind_np pthread_mutexattr_getkind_np
+-#endif /* UPNP_USE_RWLOCK */
+-
++#define ithread_mutexattr_getkind_np pthread_mutexattr_gettype
++#define ithread_mutexattr_gettype pthread_mutexattr_gettype
+ /****************************************************************************
+  * Function: ithread_mutex_init
+  *

diff --git a/net-libs/libupnp/libupnp-1.14.7.ebuild 
b/net-libs/libupnp/libupnp-1.14.7.ebuild
index 42645556aca..4dcf90126cf 100644
--- a/net-libs/libupnp/libupnp-1.14.7.ebuild
+++ b/net-libs/libupnp/libupnp-1.14.7.ebuild
@@ -10,6 +10,7 @@ MY_PN="pupnp"
 DESCRIPTION="An Portable Open Source UPnP Development Kit"
 HOMEPAGE="http://pupnp.sourceforge.net/";
 SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/release-${PV}.tar.gz -> 
${P}.tar.gz"
+S="${WORKDIR}/${MY_PN}-release-${PV}"
 
 LICENSE="BSD"
 SLOT="0/17"
@@ -19,9 +20,7 @@ IUSE="blocking-tcp debug doc ipv6 +reuseaddr samples 
static-libs"
 # bug 733750
 RESTRICT="test"
 
-DOCS="ChangeLog"
-
-S="${WORKDIR}/${MY_PN}-release-${PV}"
+PATCHES=( "${FILESDIR}/${PN}-1.14.7-glibc-2.34.patch" )
 
 src_prepare() {
        default

Reply via email to