commit:     8d8553a656635e47267f646b3771354e600aae6d
Author:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 14 07:16:33 2025 +0000
Commit:     Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Sat Jun 14 07:17:03 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d8553a6

media-radio/svxlink: Fix missing const

Closes: https://bugs.gentoo.org/957426
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>

 .../files/svxlink-25.05-fix-missing-const.patch    | 39 ++++++++++++++++++++++
 ...vxlink-25.05.ebuild => svxlink-25.05-r1.ebuild} |  2 ++
 2 files changed, 41 insertions(+)

diff --git a/media-radio/svxlink/files/svxlink-25.05-fix-missing-const.patch 
b/media-radio/svxlink/files/svxlink-25.05-fix-missing-const.patch
new file mode 100644
index 000000000000..a147f1dd5965
--- /dev/null
+++ b/media-radio/svxlink/files/svxlink-25.05-fix-missing-const.patch
@@ -0,0 +1,39 @@
+# backported from 
https://github.com/sm0svx/svxlink/commit/24588ca4d6235aceb4afd2f17a15981f88025717
+From 24588ca4d6235aceb4afd2f17a15981f88025717 Mon Sep 17 00:00:00 2001
+From: Tobias Blomberg <[email protected]>
+Date: Mon, 19 May 2025 22:15:51 +0200
+Subject: [PATCH] Fix build errors for newer versions of gcc on some distros
+
+Close #707
+---
+ src/async/core/AsyncDnsLookupWorker.h | 2 +-
+ src/svxlink/svxlink/EventHandler.cpp  | 2 +-
+ src/versions                          | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/async/core/AsyncDnsLookupWorker.h 
b/src/async/core/AsyncDnsLookupWorker.h
+index af128f23a..f7d7cbd98 100644
+--- a/src/async/core/AsyncDnsLookupWorker.h
++++ b/src/async/core/AsyncDnsLookupWorker.h
+@@ -428,7 +428,7 @@ class DnsLookupWorker
+     struct CompSRV
+     {
+       bool operator()(const DnsResourceRecordSRV* lhs,
+-                      const DnsResourceRecordSRV* rhs)
++                      const DnsResourceRecordSRV* rhs) const
+       {
+         return lhs->prio() < rhs->prio();
+       }
+diff --git a/src/svxlink/svxlink/EventHandler.cpp 
b/src/svxlink/svxlink/EventHandler.cpp
+index cacbee067..c5151867c 100644
+--- a/src/svxlink/svxlink/EventHandler.cpp
++++ b/src/svxlink/svxlink/EventHandler.cpp
+@@ -482,7 +482,7 @@ int EventHandler::genericCommandHandler(ClientData cdata, 
Tcl_Interp *irp,
+   if (!msg.empty())
+   {
+     auto msg_alloc_len = msg.size()+1;
+-    char* msg_copy = Tcl_Alloc(msg_alloc_len);
++    char* msg_copy = static_cast<char*>(Tcl_Alloc(msg_alloc_len));
+     memcpy(msg_copy, msg.c_str(), msg_alloc_len);
+     Tcl_SetResult(irp, msg_copy, TCL_DYNAMIC);
+     return TCL_ERROR;

diff --git a/media-radio/svxlink/svxlink-25.05.ebuild 
b/media-radio/svxlink/svxlink-25.05-r1.ebuild
similarity index 97%
rename from media-radio/svxlink/svxlink-25.05.ebuild
rename to media-radio/svxlink/svxlink-25.05-r1.ebuild
index 9c822432f761..1f0999c383a7 100644
--- a/media-radio/svxlink/svxlink-25.05.ebuild
+++ b/media-radio/svxlink/svxlink-25.05-r1.ebuild
@@ -45,6 +45,8 @@ BDEPEND="
        virtual/pkgconfig
        qt5? ( dev-qt/linguist-tools:5 )"
 
+PATCHES=( "${FILESDIR}"/${PN}-25.05-fix-missing-const.patch )
+
 src_prepare() {
        # fix build for MUSL (bug #936813, #942749)
        if use elibc_musl ; then

Reply via email to