From d6da5cb6a8e0e8a9ce92b7d951a254cf325248d7 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 5 Jul 2018 18:59:02 +0200 Subject: Add renameat2 function [BZ #17662] The implementation falls back to renameat if renameat2 is not available in the kernel (or in the kernel headers) and the flags argument is zero. Without kernel support, a non-zero argument returns EINVAL, not ENOSYS. This mirrors what the kernel does for invalid renameat2 flags. --- sysdeps/unix/sysv/linux/sh/kernel-features.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sysdeps/unix/sysv/linux/sh/kernel-features.h') diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h index b82d032e6b..05b7dcd037 100644 --- a/sysdeps/unix/sysv/linux/sh/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h @@ -51,4 +51,9 @@ /* sh only supports ipc syscall. */ #undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +/* Support for the renameat2 syscall was added in 4.8. */ +#if __LINUX_KERNEL_VERSION < 0x040800 +# undef __ASSUME_RENAMEAT2 +#endif + #endif -- cgit 1.4.1