mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
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.
This commit is contained in:
@ -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).
|
||||
|
Reference in New Issue
Block a user