diff options
author | Martin BĂ„ngens <noisecode3@gmail.com> | 2024-07-19 02:51:20 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2024-07-19 08:51:59 +0700 |
commit | 5d7290c295df08770f686402bb4256c01e4c444c (patch) | |
tree | da05b45af20c776f269aba131930adca79322f55 /audio/yabridge | |
parent | 86e728e6e9688cb58d2d8480dcce8574391df0e2 (diff) |
audio/yabridge: Fix dbus problem
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/yabridge')
-rw-r--r-- | audio/yabridge/fix-libdbus-connection.patch | 48 | ||||
-rw-r--r-- | audio/yabridge/yabridge.SlackBuild | 4 |
2 files changed, 51 insertions, 1 deletions
diff --git a/audio/yabridge/fix-libdbus-connection.patch b/audio/yabridge/fix-libdbus-connection.patch new file mode 100644 index 0000000000000..4acbee2927893 --- /dev/null +++ b/audio/yabridge/fix-libdbus-connection.patch @@ -0,0 +1,48 @@ +commit 8d508dc2fefe9745ffa9cb14e1d7519a7852aa95 +Author: Robbert van der Helm <mail@robbertvanderhelm.nl> +Date: Sun Apr 7 22:49:00 2024 +0200 + + Fix segfault destroying libdbus connection + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index a1739b3d..429880a6 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), + and this project adheres to [Semantic + Versioning](https://semver.org/spec/v2.0.0.html). + ++## [Unreleased] ++ ++### Fixed ++ ++- Fixed a potential segfault when unloading yabridge. ++ + ## [5.1.0] - 2023-12-23 + + ### Added +diff --git a/src/common/notifications.cpp b/src/common/notifications.cpp +index 403103bf..654b6c83 100644 +--- a/src/common/notifications.cpp ++++ b/src/common/notifications.cpp +@@ -57,9 +57,19 @@ std::mutex libdbus_mutex; + LIBDBUS_FUNCTIONS + #undef X + ++/** ++ * The deleter used for `libdbus_connection`. `libdbus_connection` can't ++ * directly reference `libdbus_connection_unref` directly because it will not ++ * yet have been initialized until just before `libdbus_connection` gets ++ * initialized. ++ */ ++static void close_dbus_connection(DBusConnection* connection) { ++ libdbus_connection_unref(connection); ++} ++ + std::unique_ptr<DBusConnection, void (*)(DBusConnection*)> libdbus_connection( + nullptr, +- libdbus_connection_unref); ++ close_dbus_connection); + + /** + * Try to set up D-Bus. Returns `false` if a function could not be resolved or diff --git a/audio/yabridge/yabridge.SlackBuild b/audio/yabridge/yabridge.SlackBuild index 2a08fe7a65ba2..f54428d0103c0 100644 --- a/audio/yabridge/yabridge.SlackBuild +++ b/audio/yabridge/yabridge.SlackBuild @@ -26,7 +26,7 @@ cd $(dirname $0) || exit 1 ; CWD=$(pwd) PRGNAM=yabridge VERSION=${VERSION:-5.1.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} ARG_CLAP=${ARG_CLAP:-NO} @@ -121,6 +121,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +patch -p1 < $CWD/fix-libdbus-connection.patch + #Build only capitalized sed -i "s|bitsery_dep = dependency('bitsery', version : '>=5.2.0')|bitsery_dep = dependency('Bitsery', version : '>=5.2.0')|g" meson.build sed -i "s|bitsery_dep = dependency('bitsery', 'Bitsery', version : '>=5.2.0')|bitsery_dep = dependency('Bitsery', version : '>=5.2.0')|g" meson.build |