]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/landlock: Make tests build with old libc
authorMickaël Salaün <mic@digikod.net>
Fri, 6 May 2022 16:08:12 +0000 (18:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:26:22 +0000 (10:26 +0200)
commit3bb6611d139927ba529337c53097c453e30081c6
tree8e4c83a76c12f127e5695c5985d79c7af2d69723
parent6754e694d9262982cac71b232885433e22cb459a
selftests/landlock: Make tests build with old libc

commit 87129ef13603ae46c82bcd09eed948acf0506dbb upstream.

Replace SYS_<syscall> with __NR_<syscall>.  Using the __NR_<syscall>
notation, provided by UAPI, is useful to build tests on systems without
the SYS_<syscall> definitions.

Replace SYS_pivot_root with __NR_pivot_root, and SYS_move_mount with
__NR_move_mount.

Define renameat2() and RENAME_EXCHANGE if they are unknown to old build
systems.

Cc: Shuah Khan <shuah@kernel.org>
Link: https://lore.kernel.org/r/20220506160820.524344-3-mic@digikod.net
Cc: stable@vger.kernel.org
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/landlock/fs_test.c