diff options
author | Florian Weimer <fweimer@redhat.com> | 2020-03-03 12:06:39 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2020-03-03 12:06:39 +0100 |
commit | f122f356c59bc6b32a9111bd97b593c39402d993 (patch) | |
tree | bc9390fb1785038fc9dbec37d75d55d1fa12abeb /sysdeps | |
parent | feaa150680f874b611f51c3349a2c8bc73f90020 (diff) | |
download | glibc-f122f356c59bc6b32a9111bd97b593c39402d993.zip glibc-f122f356c59bc6b32a9111bd97b593c39402d993.tar.gz glibc-f122f356c59bc6b32a9111bd97b593c39402d993.tar.bz2 |
Linux: renameat2 syscall number is always available
Due to the built-in tables, __NR_renameat2 is always defined.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/renameat2.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/renameat2.c b/sysdeps/unix/sysv/linux/renameat2.c index 05304c6..22b4178 100644 --- a/sysdeps/unix/sysv/linux/renameat2.c +++ b/sysdeps/unix/sysv/linux/renameat2.c @@ -29,15 +29,14 @@ __renameat2 (int oldfd, const char *old, int newfd, const char *new, #else if (flags == 0) return __renameat (oldfd, old, newfd, new); -# ifdef __NR_renameat2 + /* For non-zero flags, try the renameat2 system call. */ int ret = INLINE_SYSCALL_CALL (renameat2, oldfd, old, newfd, new, flags); if (ret != -1 || errno != ENOSYS) /* Preserve non-error/non-ENOSYS return values. */ return ret; -# endif - /* No kernel (header) support for renameat2. All flags are - unknown. */ + + /* No kernel support for renameat2. All flags are unknown. */ __set_errno (EINVAL); return -1; #endif |