From ce97c30a8d9a39baca02f0cb4682bcc02c35cd08 Mon Sep 17 00:00:00 2001 From: Alexander Tsoy Date: Thu, 22 Oct 2026 19:08:06 +0300 Subject: [PATCH] net-misc/iperf: fix build 2.2.1 on musl Closes: https://bugs.gentoo.org/984721 Signed-off-by: Alexander Tsoy Part-of: https://codeberg.org/gentoo/gentoo/pulls/2156 Merges: https://codeberg.org/gentoo/gentoo/pulls/2156 Signed-off-by: Sam James --- net-misc/iperf/files/iperf-2.2.1-musl.patch | 23 +++++++++++++++++++++ net-misc/iperf/iperf-2.2.1.ebuild | 6 +++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 net-misc/iperf/files/iperf-2.2.1-musl.patch diff --git a/net-misc/iperf/files/iperf-2.2.1-musl.patch b/net-misc/iperf/files/iperf-2.2.1-musl.patch new file mode 100644 index 0000000000000..09690e4f69d90 --- /dev/null +++ b/net-misc/iperf/files/iperf-2.2.1-musl.patch @@ -0,0 +1,23 @@ +From a25566dd66fb0ca951b3b6f6fa5a4bfaac276c71 Mon Sep 17 00:00:00 2001 +From: Robert McMahon +Date: Tue, 12 Nov 2024 12:06:54 -0800 +Subject: [PATCH] fix for buildroot linux breakage, ticket 342 + + +diff --git a/src/checksums.c b/src/checksums.c +index 852f1952..d7a8109e 100644 +--- a/src/checksums.c ++++ b/src/checksums.c +@@ -47,6 +47,9 @@ + * by Robert J. McMahon (rjmcmahon@rjmcmahon.com, bob.mcmahon@broadcom.com) + * ------------------------------------------------------------------- + */ ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif + #include "headers.h" + + /* +-- +2.55.0 + diff --git a/net-misc/iperf/iperf-2.2.1.ebuild b/net-misc/iperf/iperf-2.2.1.ebuild index 0b067a699f6ac..0175becb2bc66 100644 --- a/net-misc/iperf/iperf-2.2.1.ebuild +++ b/net-misc/iperf/iperf-2.2.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -23,6 +23,10 @@ IUSE="debug" # Fails w/ connection refused to just-spawned daemon RESTRICT="test" +PATCHES=( + "${FILESDIR}/${P}-musl.patch" +) + src_configure() { local myeconfargs=( $(use_enable debug debuginfo)