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/sparc/kernel-features.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sysdeps/unix/sysv/linux/sparc/kernel-features.h') diff --git a/sysdeps/unix/sysv/linux/sparc/kernel-features.h b/sysdeps/unix/sysv/linux/sparc/kernel-features.h index 64d714036e..91990a716f 100644 --- a/sysdeps/unix/sysv/linux/sparc/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sparc/kernel-features.h @@ -41,6 +41,11 @@ /* sparc only supports ipc syscall. */ #undef __ASSUME_DIRECT_SYSVIPC_SYSCALLS +/* Support for the renameat2 syscall was added in 3.16. */ +#if __LINUX_KERNEL_VERSION < 0x031000 +# undef __ASSUME_RENAMEAT2 +#endif + /* SPARC kernel Kconfig does not define CONFIG_CLONE_BACKWARDS, however it has the same ABI as if it did, implemented by sparc-specific code (sparc_do_fork). -- cgit v1.2.3