]> git.baikalelectronics.ru Git - kernel.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)
committerMickaël Salaün <mic@digikod.net>
Mon, 23 May 2022 11:27:48 +0000 (13:27 +0200)
commit1c1cda8e1277fce83d1e53d0e31525d6bba26b98
tree257af7899218bba885698a84f887f0ee37157ec9
parent6af1f5a7c7d5fc3f58c33ba1e2e90ebbbd9df65f
selftests/landlock: Make tests build with old libc

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>
tools/testing/selftests/landlock/fs_test.c