pipewire: update to 0.3.32

This commit is contained in:
Stefano Ragni 2021-07-20 16:36:10 +02:00 committed by Érico Nogueira Rolim
parent 49cff871e2
commit 8be918ab49
2 changed files with 66 additions and 2 deletions

View file

@ -0,0 +1,64 @@
From master, will be in 0.3.33
diff --git a/meson.build b/meson.build
index 838fb66be8ca0e2d66009696f6c00c2ff7580b6e..977ce9ba1f22a2785efcb1b5a5bee08cf2e4bec3 100644
--- a/meson.build
+++ b/meson.build
@@ -254,6 +254,9 @@ endif
if cc.has_function('getpagesize', prefix : '#include<unistd.h>')
cdata.set('HAVE_GETPAGESIZE', 1)
endif
+if cc.has_function('gettid', prefix : '#include<unistd.h>', args: [ '-D_GNU_SOURCE' ])
+ cdata.set('HAVE_GETTID', 1)
+endif
if cc.has_function('clock_gettime', prefix : '#include <time.h>')
cdata.set('HAVE_CLOCK_GETTIME', 1)
endif
diff --git a/src/modules/module-rtkit.c b/src/modules/module-rtkit.c
index 1f13aa371192bee738c4e10b45917473d2f9856d..7d55fb758cdc0a3073e3e3f2536949e824ffa223 100644
--- a/src/modules/module-rtkit.c
+++ b/src/modules/module-rtkit.c
@@ -182,12 +182,16 @@ void pw_rtkit_bus_free(struct pw_rtkit_bus *system_bus)
static pid_t _gettid(void)
{
-#ifndef __FreeBSD__
+#if defined(HAVE_GETTID)
return (pid_t) gettid();
-#else
+#elif defined(__linux__)
+ return syscall(SYS_gettid);
+#elif defined(__FreeBSD__)
long pid;
thr_self(&pid);
return (pid_t)pid;
+#else
+#error "No gettid impl"
#endif
}
diff --git a/src/modules/module-rtkit.c b/src/modules/module-rtkit.c
index de30f4123cf017f8be2eb7d4cd3bababb51da6fc..419e4be815a46d0f466969a02813f481d48ee5a1 100644
--- a/src/modules/module-rtkit.c
+++ b/src/modules/module-rtkit.c
@@ -518,7 +518,7 @@ static void *custom_start(void *data)
struct impl *impl = this->impl;
pthread_mutex_lock(&impl->lock);
- this->pid = gettid();
+ this->pid = _gettid();
pthread_cond_broadcast(&impl->cond);
pthread_mutex_unlock(&impl->lock);
diff --git a/src/modules/module-rtkit.c b/src/modules/module-rtkit.c
index 419e4be815a46d0f466969a02813f481d48ee5a1..1f13aa371192bee738c4e10b45917473d2f9856d 100644
--- a/src/modules/module-rtkit.c
+++ b/src/modules/module-rtkit.c
@@ -592,7 +592,7 @@ static pid_t impl_gettid(struct impl *impl, pthread_t pt)
if ((thr = find_thread_by_pt(impl, pt)) != NULL)
pid = thr->pid;
else
- pid = getpid();
+ pid = _gettid();
pthread_mutex_unlock(&impl->lock);
return pid;

View file

@ -1,6 +1,6 @@
# Template file for 'pipewire'
pkgname=pipewire
version=0.3.31
version=0.3.32
revision=1
build_style=meson
configure_args="-Dman=enabled -Dgstreamer=enabled -Ddocs=enabled -Dsystemd=disabled
@ -18,7 +18,7 @@ license="MIT"
homepage="https://pipewire.org/"
changelog="https://gitlab.freedesktop.org/pipewire/pipewire/-/raw/master/NEWS"
distfiles="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${version}/pipewire-${version}.tar.gz"
checksum=2fec0eb47dbfcad51fb8bb3d59c26fe57e09204d63c9d2776070dbdc08aaaaae
checksum=8b2af6138529fd9214dd148f2a6304f13c16e0b0d3a4a98c1afa87b7e65c574f
make_dirs="/var/lib/pipewire 0755 _pipewire _pipewire"
system_accounts="_pipewire"