commit:     3f877c262138875befc4276fc8cacd30d6e3c30e
Author:     Brett A C Sheffield <bacs <AT> librecast <DOT> net>
AuthorDate: Sun Feb  8 08:47:21 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb  9 23:42:11 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f877c26

net-libs/libnice: fix test-pseudotcp (musl)

Fix 'Socket Closed : 104' error on musl systems.

Do not raise an error on socket closed if we closed it explicitly.

On musl systems, test-pseudotcp was failing consistently due to the
closing callback being triggered during the cleanup phase.

Closes: https://bugs.gentoo.org/836632
Signed-off-by: Brett A C Sheffield <bacs <AT> librecast.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/libnice-0.1.23-fix-test-pseudotcp.patch  | 30 ++++++++++++++++++++++
 net-libs/libnice/libnice-0.1.23.ebuild             |  1 +
 2 files changed, 31 insertions(+)

diff --git a/net-libs/libnice/files/libnice-0.1.23-fix-test-pseudotcp.patch 
b/net-libs/libnice/files/libnice-0.1.23-fix-test-pseudotcp.patch
new file mode 100644
index 000000000000..f0a3b71af9b8
--- /dev/null
+++ b/net-libs/libnice/files/libnice-0.1.23-fix-test-pseudotcp.patch
@@ -0,0 +1,30 @@
+From b2b05e43e1fe90610dac66d2b46d6d2fbf8badf8 Mon Sep 17 00:00:00 2001
+From: Brett A C Sheffield <[email protected]>
+Date: Tue, 20 Jan 2026 11:27:13 +0000
+Subject: [PATCH] test-pseudotcp: fix socket close error (musl)
+
+Do not raise an error on socket closed if we closed it explicitly.
+
+On musl systems, test-pseudotcp was failing consistently due to the
+closing callback being triggered during the cleanup phase.
+---
+ tests/test-pseudotcp.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test-pseudotcp.c b/tests/test-pseudotcp.c
+index 0a5f1d1f..3f243120 100644
+--- a/tests/test-pseudotcp.c
++++ b/tests/test-pseudotcp.c
+@@ -161,7 +161,8 @@ static void writable (PseudoTcpSocket *sock, gpointer data)
+ 
+ static void closed (PseudoTcpSocket *sock, guint32 err, gpointer data)
+ {
+-  g_error ("Socket %p Closed : %d", sock, err);
++  if (left_closed == FALSE && right_closed == FALSE)
++    g_error ("Socket %p Closed : %d", sock, err);
+ }
+ 
+ struct notify_data {
+-- 
+2.52.0
+

diff --git a/net-libs/libnice/libnice-0.1.23.ebuild 
b/net-libs/libnice/libnice-0.1.23.ebuild
index a477b3b410f6..32917c6d10a2 100644
--- a/net-libs/libnice/libnice-0.1.23.ebuild
+++ b/net-libs/libnice/libnice-0.1.23.ebuild
@@ -35,6 +35,7 @@ BDEPEND="
 PATCHES=(
        "${FILESDIR}/${PN}-0.1.19-remove-graphviz-dependency.patch" # 
downstream; bugs 877451, 889820
        "${FILESDIR}/${PN}-0.1.22-gupnp-igd-1.6.patch" # downstream; bugs 
948374, 953635
+       "${FILESDIR}/${PN}-0.1.23-fix-test-pseudotcp.patch" # bug 836632
 )
 
 src_prepare() {

Reply via email to