mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +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:
@@ -35,6 +35,11 @@
|
||||
#define __ASSUME_RECV_SYSCALL 1
|
||||
#define __ASSUME_SEND_SYSCALL 1
|
||||
|
||||
/* Support for the renameat2 syscall was added in 3.17. */
|
||||
#if __LINUX_KERNEL_VERSION < 0x031100
|
||||
# undef __ASSUME_RENAMEAT2
|
||||
#endif
|
||||
|
||||
/* Support for the execveat syscall was added in 4.2. */
|
||||
#if __LINUX_KERNEL_VERSION < 0x040200
|
||||
# undef __ASSUME_EXECVEAT
|
||||
|
||||
Reference in New Issue
Block a user