All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [meta-multimedia][PATCH] libupnp: Do not use _np versions of mutex APIs
@ 2021-05-09 22:44 Khem Raj
  0 siblings, 0 replies; only message in thread
From: Khem Raj @ 2021-05-09 22:44 UTC (permalink / raw
  To: openembedded-devel; +Cc: Khem Raj, Andreas Müller

These APIs are deprecated/removed in future glibc 2.34+

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andreas Müller <schnitzeltony@gmail.com>
---
 ...ead_mutexattr_gettype-pthread_mutexa.patch | 42 +++++++++++++++++++
 .../libupnp/libupnp_1.14.6.bb                 |  8 ++--
 2 files changed, 47 insertions(+), 3 deletions(-)
 create mode 100644 meta-multimedia/recipes-connectivity/libupnp/libupnp/0001-ithread-Use-pthread_mutexattr_gettype-pthread_mutexa.patch

diff --git a/meta-multimedia/recipes-connectivity/libupnp/libupnp/0001-ithread-Use-pthread_mutexattr_gettype-pthread_mutexa.patch b/meta-multimedia/recipes-connectivity/libupnp/libupnp/0001-ithread-Use-pthread_mutexattr_gettype-pthread_mutexa.patch
new file mode 100644
index 0000000000..ee78196779
--- /dev/null
+++ b/meta-multimedia/recipes-connectivity/libupnp/libupnp/0001-ithread-Use-pthread_mutexattr_gettype-pthread_mutexa.patch
@@ -0,0 +1,42 @@
+From 343a3b724225d3c87af0b268da14d3acb7a5b9a1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 9 May 2021 15:38:43 -0700
+Subject: [PATCH] ithread: Use
+ pthread_mutexattr_gettype/pthread_mutexattr_settype on linux
+
+_np variants are not recommended anymore, and glibc 2.34+ will have
+these removed
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ upnp/inc/ithread.h | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/upnp/inc/ithread.h b/upnp/inc/ithread.h
+index f6800ea9..1d0f9dba 100644
+--- a/upnp/inc/ithread.h
++++ b/upnp/inc/ithread.h
+@@ -304,7 +304,8 @@ static UPNP_INLINE int ithread_cleanup_thread(void)
+  *      Returns EINVAL if the kind is not supported.
+  *      See man page for pthread_mutexattr_setkind_np
+  *****************************************************************************/
+-#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__)
++#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__) \
++    || defined (__linux__)
+ 	#define ithread_mutexattr_setkind_np pthread_mutexattr_settype
+ #else
+ 	#define ithread_mutexattr_setkind_np pthread_mutexattr_setkind_np
+@@ -329,7 +330,8 @@ static UPNP_INLINE int ithread_cleanup_thread(void)
+  *      Always returns 0.
+  *      See man page for pthread_mutexattr_getkind_np
+  *****************************************************************************/
+-#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__)
++#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__) \
++    || defined (__linux__)
+ 	#define ithread_mutexattr_getkind_np pthread_mutexattr_gettype
+ #else
+ 	#define ithread_mutexattr_getkind_np pthread_mutexattr_getkind_np
+-- 
+2.31.1
+
diff --git a/meta-multimedia/recipes-connectivity/libupnp/libupnp_1.14.6.bb b/meta-multimedia/recipes-connectivity/libupnp/libupnp_1.14.6.bb
index ff6fb55dd3..81b42da412 100644
--- a/meta-multimedia/recipes-connectivity/libupnp/libupnp_1.14.6.bb
+++ b/meta-multimedia/recipes-connectivity/libupnp/libupnp_1.14.6.bb
@@ -9,7 +9,9 @@ LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://COPYING;md5=394a0f17b97f33426275571e15920434"
 
 SRCREV = "cef2b23fb36baac091b0c7d41136b4c1d9549c6d"
-SRC_URI = "git://github.com/pupnp/pupnp.git;protocol=https;branch=branch-1.14.x"
+SRC_URI = "git://github.com/pupnp/pupnp.git;protocol=https;branch=branch-1.14.x \
+           file://0001-ithread-Use-pthread_mutexattr_gettype-pthread_mutexa.patch \
+          "
 
 S="${WORKDIR}/git"
 
@@ -18,5 +20,5 @@ inherit autotools pkgconfig
 EXTRA_OECONF += "--enable-reuseaddr"
 
 # Enable LFS support ( for samples )
-CFLAGS += "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
-CXXFLAGS += "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
+CFLAGS += "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE"
+CXXFLAGS += "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE"
-- 
2.31.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-09 22:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-09 22:44 [meta-multimedia][PATCH] libupnp: Do not use _np versions of mutex APIs Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.