aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sparc/kernel-features.h
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2018-07-05 18:59:02 +0200
committerFlorian Weimer <fweimer@redhat.com>2018-07-05 19:00:10 +0200
commitd6da5cb6a8e0e8a9ce92b7d951a254cf325248d7 (patch)
tree4c8f50e0ec6b6780eb1eb4dd2b496f0a1b1411d3 /sysdeps/unix/sysv/linux/sparc/kernel-features.h
parent1002d708232dda9ebff65f6c1409fa067a01b6e0 (diff)
downloadglibc-d6da5cb6a8e0e8a9ce92b7d951a254cf325248d7.tar
glibc-d6da5cb6a8e0e8a9ce92b7d951a254cf325248d7.tar.gz
glibc-d6da5cb6a8e0e8a9ce92b7d951a254cf325248d7.tar.bz2
glibc-d6da5cb6a8e0e8a9ce92b7d951a254cf325248d7.zip
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.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc/kernel-features.h')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/kernel-features.h5
1 files changed, 5 insertions, 0 deletions
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).