Files
meta-openembedded/meta-oe/recipes-benchmark/iperf2
Khem Raj e9567c58f8 iperf2: Add _GNU_SOURCE in checksums.c
glibc defines struct udphdr as a union where members have aliased names

uh_sport -> source
uh_dport -> uh_dport
uh_dport -> len
check -> check

But musl only defines the aliases if _GNU_SOURCE is defined, ideally
iperf2 should be using uh_* names of the members so it is portable across
musl and glibc but thats for upstream to consider.

Fixes
| ../../iperf-2.2.1/src/checksums.c:175:19: error: no member named 'check' in 'struct udphdr'
|   175 |     if (!udp_hdr->check) {
|       |          ~~~~~~~  ^
| 1 error generated.
| make[2]: *** [Makefile:539: checksums.o] Error 1

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Randy MacLeod <Randy.MacLeod@windriver.com>
2025-03-28 19:40:58 -07:00
..