aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
diff options
context:
space:
mode:
authorTony Ambardar <[email protected]>2024-07-23 05:54:41 +0000
committerAndrii Nakryiko <[email protected]>2024-07-29 22:05:08 +0000
commit18826fb0b79c3c3cd1fe765d85f9c6f1a902c722 (patch)
tree4ebc3ce0b8959840af684063ba55363fb28cf252 /tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
parentselftests/bpf: Fix compiling flow_dissector.c with musl-libc (diff)
downloadkernel-18826fb0b79c3c3cd1fe765d85f9c6f1a902c722.tar.gz
kernel-18826fb0b79c3c3cd1fe765d85f9c6f1a902c722.zip
selftests/bpf: Fix compiling tcp_rtt.c with musl-libc
The GNU version of 'struct tcp_info' in 'netinet/tcp.h' is not exposed by musl headers unless _GNU_SOURCE is defined. Add this definition to fix errors seen compiling for mips64el/musl-libc: tcp_rtt.c: In function 'wait_for_ack': tcp_rtt.c:24:25: error: storage size of 'info' isn't known 24 | struct tcp_info info; | ^~~~ tcp_rtt.c:24:25: error: unused variable 'info' [-Werror=unused-variable] cc1: all warnings being treated as errors Fixes: 1f4f80fed217 ("selftests/bpf: test_progs: convert test_tcp_rtt") Signed-off-by: Tony Ambardar <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/f2329767b15df206f08a5776d35a47c37da855ae.1721713597.git.tony.ambardar@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_rtt.c')
-rw-r--r--tools/testing/selftests/bpf/prog_tests/tcp_rtt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
index f2b99d95d916..c38784c1c066 100644
--- a/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
+++ b/tools/testing/selftests/bpf/prog_tests/tcp_rtt.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
+#define _GNU_SOURCE
#include <test_progs.h>
#include "cgroup_helpers.h"
#include "network_helpers.h"