commit: 548578455900b398c0c0832506f0d8ec0f218dee Author: Wolfgang Müller <wolf <AT> oriole <DOT> systems> AuthorDate: Sun Sep 29 11:15:26 2024 +0000 Commit: Eli Schwartz <eschwartz <AT> gentoo <DOT> org> CommitDate: Mon Oct 7 03:23:56 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54857845
net-voip/murmur: fix build on musl Closes: https://bugs.gentoo.org/888960 Signed-off-by: Wolfgang Müller <wolf <AT> oriole.systems> Closes: https://github.com/gentoo/gentoo/pull/38812 Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org> ....5.634-remove-redundant-OpenSSL-locking-c.patch | 54 ++++++++++++++++++++++ net-voip/murmur/murmur-1.5.634.ebuild | 5 ++ 2 files changed, 59 insertions(+) diff --git a/net-voip/murmur/files/murmur-1.5.634-remove-redundant-OpenSSL-locking-c.patch b/net-voip/murmur/files/murmur-1.5.634-remove-redundant-OpenSSL-locking-c.patch new file mode 100644 index 000000000000..1e8806bda2fe --- /dev/null +++ b/net-voip/murmur/files/murmur-1.5.634-remove-redundant-OpenSSL-locking-c.patch @@ -0,0 +1,54 @@ +From 2be534747d2bd111e64fb163120caa6c78d04abe Mon Sep 17 00:00:00 2001 +From: Alyssa Ross <[email protected]> +Date: Mon, 16 Sep 2024 18:16:49 +0200 +Subject: [PATCH] FIX(client, server): Remove redundant OpenSSL locking + callback check +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +CRYPTO_get_locking_callback() has been defined to NULL since OpenSSL +1.1.0. This check therefore doesn't do anything in any supported +version of OpenSSL: + +https://github.com/openssl/openssl/blob/abd30777cc72029e8a44e4b67201cae8ed3d19c1/include/openssl/crypto.h#L220 + +This fixes the following compiler error that I saw with GCC 14: + +/build/source/src/SSL.cpp: In static member function ‘static void MumbleSSL::initialize()’: +/build/source/src/SSL.cpp:36:14: error: converting to ‘bool’ from ‘std::nullptr_t’ requires direct-initialization [-fpermissive] + 36 | if (!CRYPTO_get_locking_callback()) { + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ + +(cherry picked from commit 56945a9dfb62d29dccfe561572ebf64500deaed1) +--- + src/SSL.cpp | 13 +------------ + 1 file changed, 1 insertion(+), 12 deletions(-) + +diff --git a/src/SSL.cpp b/src/SSL.cpp +index bb30f7e9f..72161009c 100644 +--- a/src/SSL.cpp ++++ b/src/SSL.cpp +@@ -24,18 +24,7 @@ void MumbleSSL::initialize() { + SSL_library_init(); // Safe to discard return value, per OpenSSL man pages. + SSL_load_error_strings(); + +- // Determine if a locking callback has not been set. +- // This should be the case if there are multiple copies +- // of OpensSSL in the address space. This is mostly due +- // to Qt dynamically loading OpenSSL when it is not +- // configured with -openssl-linked. +- // +- // If we detect that no locking callback is configured, we +- // have to set it up ourselves to allow multi-threaded use +- // of OpenSSL. +- if (!CRYPTO_get_locking_callback()) { +- SSLLocks::initialize(); +- } ++ SSLLocks::initialize(); + } + + void MumbleSSL::destroy() { +-- +2.46.2 + diff --git a/net-voip/murmur/murmur-1.5.634.ebuild b/net-voip/murmur/murmur-1.5.634.ebuild index 2162f57c5ffd..64472a63810f 100644 --- a/net-voip/murmur/murmur-1.5.634.ebuild +++ b/net-voip/murmur/murmur-1.5.634.ebuild @@ -72,6 +72,11 @@ BDEPEND=" virtual/pkgconfig " +PATCHES=( + # fix build on musl, bug #888960 + "${FILESDIR}"/murmur-1.5.634-remove-redundant-OpenSSL-locking-c.patch +) + DISABLE_AUTOFORMATTING="yes" DOC_CONTENTS=" The default 'SuperUser' password will be written into the log file
