]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/bpf: Fix include of <sys/fcntl.h>
authorTony Ambardar <tony.ambardar@gmail.com>
Tue, 23 Jul 2024 05:54:37 +0000 (22:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:17 +0000 (16:29 +0200)
commit52f5ed9461f4be68d4b7a4a7fd44190e5479d470
tree4eb51e27432bd4952f281bee0d19cb0a355e0963
parent4730b07ef7745d7cd48c6aa9f72d75ac136d436f
selftests/bpf: Fix include of <sys/fcntl.h>

[ Upstream commit 21f0b0af977203220ad58aff95e372151288ec47 ]

Update ns_current_pid_tgid.c to use '#include <fcntl.h>' and avoid compile
error against mips64el/musl libc:

  In file included from .../prog_tests/ns_current_pid_tgid.c:14:
  .../include/sys/fcntl.h:1:2: error: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Werror=cpp]
      1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
        |  ^~~~~~~
  cc1: all warnings being treated as errors

Fixes: 09c02d553c49 ("bpf, selftests: Fold test_current_pid_tgid_new_ns into test_progs.")
Signed-off-by: Tony Ambardar <tony.ambardar@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/8bdc869749177b575025bf69600a4ce591822609.1721713597.git.tony.ambardar@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/bpf/prog_tests/ns_current_pid_tgid.c