Patch "selftests/bpf: Fix compiling parse_tcp_hdr_opt.c with musl-libc" has been added to the 6.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    selftests/bpf: Fix compiling parse_tcp_hdr_opt.c with musl-libc

to the 6.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     selftests-bpf-fix-compiling-parse_tcp_hdr_opt.c-with.patch
and it can be found in the queue-6.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b26b5ba92215fde667114a3b4e55ab69692c9efe
Author: Tony Ambardar <tony.ambardar@xxxxxxxxx>
Date:   Mon Jul 22 22:54:38 2024 -0700

    selftests/bpf: Fix compiling parse_tcp_hdr_opt.c with musl-libc
    
    [ Upstream commit 4c329b99ef9c118343379bde9f97e8ce5cac9fc9 ]
    
    The GNU version of 'struct tcphdr', with members 'doff' and 'urg_ptr', is
    not exposed by musl headers unless _GNU_SOURCE is defined.
    
    Add this definition to fix errors seen compiling for mips64el/musl-libc:
    
      parse_tcp_hdr_opt.c:18:21: error: 'struct tcphdr' has no member named 'urg_ptr'
         18 |         .pk6_v6.tcp.urg_ptr = 123,
            |                     ^~~~~~~
      parse_tcp_hdr_opt.c:19:21: error: 'struct tcphdr' has no member named 'doff'
         19 |         .pk6_v6.tcp.doff = 9, /* 16 bytes of options */
            |                     ^~~~
    
    Fixes: cfa7b011894d ("selftests/bpf: tests for using dynptrs to parse skb and xdp buffers")
    Signed-off-by: Tony Ambardar <tony.ambardar@xxxxxxxxx>
    Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/ac5440213c242c62cb4e0d9e0a9cd5058b6a31f6.1721713597.git.tony.ambardar@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/bpf/prog_tests/parse_tcp_hdr_opt.c b/tools/testing/selftests/bpf/prog_tests/parse_tcp_hdr_opt.c
index daa952711d8fd..e9c07d561ded6 100644
--- a/tools/testing/selftests/bpf/prog_tests/parse_tcp_hdr_opt.c
+++ b/tools/testing/selftests/bpf/prog_tests/parse_tcp_hdr_opt.c
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 
+#define _GNU_SOURCE
 #include <test_progs.h>
 #include <network_helpers.h>
 #include "test_parse_tcp_hdr_opt.skel.h"




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux