diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-05-09 15:41:52 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-05-11 08:27:27 -0700 |
commit | 40622feb2e25a0e1ec72f6fda473d6523c21a7cc (patch) | |
tree | 478ef9fc680d79b7f9e8b86242aec7e1323e7100 | |
parent | af43242a22861e9fc110d97cc4e06fed0be4325e (diff) | |
download | meta-openembedded-40622feb2e25a0e1ec72f6fda473d6523c21a7cc.tar.gz |
libupnp: Do not use _np versions of mutex APIs
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>
2 files changed, 47 insertions, 3 deletions
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 @@ | |||
1 | From 343a3b724225d3c87af0b268da14d3acb7a5b9a1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 9 May 2021 15:38:43 -0700 | ||
4 | Subject: [PATCH] ithread: Use | ||
5 | pthread_mutexattr_gettype/pthread_mutexattr_settype on linux | ||
6 | |||
7 | _np variants are not recommended anymore, and glibc 2.34+ will have | ||
8 | these removed | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | upnp/inc/ithread.h | 6 ++++-- | ||
14 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/upnp/inc/ithread.h b/upnp/inc/ithread.h | ||
17 | index f6800ea9..1d0f9dba 100644 | ||
18 | --- a/upnp/inc/ithread.h | ||
19 | +++ b/upnp/inc/ithread.h | ||
20 | @@ -304,7 +304,8 @@ static UPNP_INLINE int ithread_cleanup_thread(void) | ||
21 | * Returns EINVAL if the kind is not supported. | ||
22 | * See man page for pthread_mutexattr_setkind_np | ||
23 | *****************************************************************************/ | ||
24 | -#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__) | ||
25 | +#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__) \ | ||
26 | + || defined (__linux__) | ||
27 | #define ithread_mutexattr_setkind_np pthread_mutexattr_settype | ||
28 | #else | ||
29 | #define ithread_mutexattr_setkind_np pthread_mutexattr_setkind_np | ||
30 | @@ -329,7 +330,8 @@ static UPNP_INLINE int ithread_cleanup_thread(void) | ||
31 | * Always returns 0. | ||
32 | * See man page for pthread_mutexattr_getkind_np | ||
33 | *****************************************************************************/ | ||
34 | -#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__) | ||
35 | +#if defined(PTHREAD_MUTEX_RECURSIVE) || defined(__DragonFly__) \ | ||
36 | + || defined (__linux__) | ||
37 | #define ithread_mutexattr_getkind_np pthread_mutexattr_gettype | ||
38 | #else | ||
39 | #define ithread_mutexattr_getkind_np pthread_mutexattr_getkind_np | ||
40 | -- | ||
41 | 2.31.1 | ||
42 | |||
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" | |||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=394a0f17b97f33426275571e15920434" | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=394a0f17b97f33426275571e15920434" |
10 | 10 | ||
11 | SRCREV = "cef2b23fb36baac091b0c7d41136b4c1d9549c6d" | 11 | SRCREV = "cef2b23fb36baac091b0c7d41136b4c1d9549c6d" |
12 | SRC_URI = "git://github.com/pupnp/pupnp.git;protocol=https;branch=branch-1.14.x" | 12 | SRC_URI = "git://github.com/pupnp/pupnp.git;protocol=https;branch=branch-1.14.x \ |
13 | file://0001-ithread-Use-pthread_mutexattr_gettype-pthread_mutexa.patch \ | ||
14 | " | ||
13 | 15 | ||
14 | S="${WORKDIR}/git" | 16 | S="${WORKDIR}/git" |
15 | 17 | ||
@@ -18,5 +20,5 @@ inherit autotools pkgconfig | |||
18 | EXTRA_OECONF += "--enable-reuseaddr" | 20 | EXTRA_OECONF += "--enable-reuseaddr" |
19 | 21 | ||
20 | # Enable LFS support ( for samples ) | 22 | # Enable LFS support ( for samples ) |
21 | CFLAGS += "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" | 23 | CFLAGS += "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE" |
22 | CXXFLAGS += "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" | 24 | CXXFLAGS += "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE" |