Files
gentoo/net-misc/iputils/files/meson-build-strict-check-for-error-function.patch
Brahmajit Das 3116078ff9 net-misc/iputils: Rebase patch with proper commit and gentoo bug
Changed the patch metadata to what was merged upstream.
Also fixed the incorrect bug number.

Closes: https://bugs.gentoo.org/951050
Signed-off-by: Brahmajit Das <listout@listout.xyz>
Part-of: https://github.com/gentoo/gentoo/pull/44979
Closes: https://github.com/gentoo/gentoo/pull/44979
Signed-off-by: Sam James <sam@gentoo.org>
2025-12-22 11:40:36 +00:00

31 lines
1.8 KiB
Diff

https://github.com/iputils/iputils/commit/35ed506fe4bfc393284138915017d4b7da1a6f3e
From: Brahmajit Das <listout@listout.xyz>
Date: Sun, 22 Jun 2025 07:30:38 +0530
Subject: [PATCH] meson.build: Enhance check for error() function
Along with checking for presence of <error.h> some toolchains also
require to check for error() function to avoid linking error, e.g.
powerpc64-unknown-linux-musl-gcc from Gentoo:
[17/18] powerpc64-unknown-linux-musl-gcc -o ping/ping ping/ping.p/ping.c.o ping/ping.p/ping_common.c.o ping/ping.p/ping6_common.c.o ping/ping.p/node_info.c.o -Wl,--as-needed -Wl,--no-undefined -Os -pipe -mcpu=970 -mtune=970 -maltivec -mabi=altivec -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--start-group libcommon.a -lm -lresolv -Wl,--end-group
FAILED: ping/ping
powerpc64-unknown-linux-musl-gcc -o ping/ping ping/ping.p/ping.c.o ping/ping.p/ping_common.c.o ping/ping.p/ping6_common.c.o ping/ping.p/node_info.c.o -Wl,--as-needed -Wl,--no-undefined -Os -pipe -mcpu=970 -mtune=970 -maltivec -mabi=altivec -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--start-group libcommon.a -lm -lresolv -Wl,--end-group
/usr/lib/gcc/powerpc64-unknown-linux-musl/14/../../../../powerpc64-unknown-linux-musl/bin/ld: ping/ping.p/ping.c.o: in function `ping_strtod':
ping.c:(.text+0x1c8): undefined reference to `error'
Closes: https://github.com/iputils/iputils/pull/601
Dowstream-bug: https://bugs.gentoo.org/951050
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Signed-off-by: Brahmajit Das <listout@listout.xyz>
--- 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