commit:     2365d88431772bf7485e02fb3db4b1624f6d751e
Author:     Brahmajit Das <listout <AT> listout <DOT> xyz>
AuthorDate: Sun Jun 22 15:49:17 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jul 12 02:10:13 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2365d884

net-misc/iputils: Fix undefined reference to error on musl

Closes: https://bugs.gentoo.org/951050
Signed-off-by: Brahmajit Das <listout <AT> listout.xyz>
Part-of: https://github.com/gentoo/gentoo/pull/42690
Closes: https://github.com/gentoo/gentoo/pull/42690
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...son-build-strict-check-for-error-function.patch | 24 ++++++++++++++++++++++
 ...-99999999.ebuild => iputils-20250605-r1.ebuild} |  6 +++++-
 net-misc/iputils/iputils-99999999.ebuild           |  6 +++++-
 3 files changed, 34 insertions(+), 2 deletions(-)

diff --git 
a/net-misc/iputils/files/meson-build-strict-check-for-error-function.patch 
b/net-misc/iputils/files/meson-build-strict-check-for-error-function.patch
new file mode 100644
index 000000000000..1083918c9ed2
--- /dev/null
+++ b/net-misc/iputils/files/meson-build-strict-check-for-error-function.patch
@@ -0,0 +1,24 @@
+https://github.com/iputils/iputils/pull/601
+From: Brahmajit Das <[email protected]>
+Date: Sun, 22 Jun 2025 07:30:38 +0530
+Subject: [PATCH] meson.build: strict check for error function
+
+Along with checking for presense of error.h we should also check if we
+can use the error function and it's getting properly linked.
+
+Dowstream-bug: https://bugs.gentoo.org/947680
+Signed-off-by: Brahmajit Das <[email protected]>
+--- a/meson.build
++++ b/meson.build
+@@ -143,7 +143,7 @@ endif
+ foreach h : [
+       'error.h',
+ ]
+-      if cc.has_header(h)
++      if cc.has_header(h) and cc.has_function('error')
+               conf.set('HAVE_' + h.to_upper().underscorify(), 1,
+                       description : 'Define if ' + h + ' can be included.')
+       endif
+-- 
+2.50.0
+

diff --git a/net-misc/iputils/iputils-99999999.ebuild 
b/net-misc/iputils/iputils-20250605-r1.ebuild
similarity index 96%
copy from net-misc/iputils/iputils-99999999.ebuild
copy to net-misc/iputils/iputils-20250605-r1.ebuild
index 1b08f7678320..5182e29fbed5 100644
--- a/net-misc/iputils/iputils-99999999.ebuild
+++ b/net-misc/iputils/iputils-20250605-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -55,6 +55,10 @@ if [[ ${PV} == 9999 ]] ; then
        "
 fi
 
+PATCHES=(
+       "${FILESDIR}/meson-build-strict-check-for-error-function.patch"
+)
+
 src_prepare() {
        default
 

diff --git a/net-misc/iputils/iputils-99999999.ebuild 
b/net-misc/iputils/iputils-99999999.ebuild
index 1b08f7678320..5182e29fbed5 100644
--- a/net-misc/iputils/iputils-99999999.ebuild
+++ b/net-misc/iputils/iputils-99999999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -55,6 +55,10 @@ if [[ ${PV} == 9999 ]] ; then
        "
 fi
 
+PATCHES=(
+       "${FILESDIR}/meson-build-strict-check-for-error-function.patch"
+)
+
 src_prepare() {
        default
 

Reply via email to