]> sourceware.org Git - glibc.git/commitdiff
Linux: renameat2 syscall number is always available
authorFlorian Weimer <fweimer@redhat.com>
Tue, 3 Mar 2020 11:06:39 +0000 (12:06 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 3 Mar 2020 11:06:39 +0000 (12:06 +0100)
Due to the built-in tables, __NR_renameat2 is always defined.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/unix/sysv/linux/renameat2.c

index 05304c64450aeabd4f4296b6cfc61d0ec5993dde..22b4178a0836cffcacdc7fe501fd01dfabbd0f2c 100644 (file)
@@ -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
This page took 0.047724 seconds and 5 git commands to generate.