about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-10-24 16:12:15 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-11-01 09:45:14 -0300
commitd227fd53cbbc9ae7e5604da3669d04b6ccb53aa1 (patch)
tree2bd3407bb4d1233203885c802f082de86e63e63d /sysdeps
parentd08dec4ea7c9f8b1d734cc1ba80c7f70df2f2c25 (diff)
downloadglibc-d227fd53cbbc9ae7e5604da3669d04b6ccb53aa1.tar.gz
glibc-d227fd53cbbc9ae7e5604da3669d04b6ccb53aa1.tar.xz
glibc-d227fd53cbbc9ae7e5604da3669d04b6ccb53aa1.zip
Apply asm redirection in not-cancel before first use
It is avoid a build failure on clang where it can not redeclare function
attribute after its first use.

Reviewed-by: Fangrui Song <maskray@google.com>
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/not-cancel.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index 93615de681..d4f1e0fbde 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -52,6 +52,21 @@ __typeof (__write) __write_nocancel;
 /* Uncancelable close.  */
 __typeof (__close) __close_nocancel;
 
+/* Uncancelable fcntl.  */
+__typeof (__fcntl) __fcntl64_nocancel;
+
+#if IS_IN (libc) || IS_IN (rtld)
+hidden_proto (__open_nocancel)
+hidden_proto (__open64_nocancel)
+hidden_proto (__openat_nocancel)
+hidden_proto (__openat64_nocancel)
+hidden_proto (__read_nocancel)
+hidden_proto (__pread64_nocancel)
+hidden_proto (__write_nocancel)
+hidden_proto (__close_nocancel)
+hidden_proto (__fcntl64_nocancel)
+#endif
+
 /* Non cancellable close syscall that does not also set errno in case of
    failure.  */
 static inline void
@@ -80,19 +95,4 @@ __poll_infinity_nocancel (struct pollfd *fds, nfds_t nfds)
   return INLINE_SYSCALL_CALL (ppoll, fds, nfds, NULL, NULL, 0);
 }
 
-/* Uncancelable fcntl.  */
-__typeof (__fcntl) __fcntl64_nocancel;
-
-#if IS_IN (libc) || IS_IN (rtld)
-hidden_proto (__open_nocancel)
-hidden_proto (__open64_nocancel)
-hidden_proto (__openat_nocancel)
-hidden_proto (__openat64_nocancel)
-hidden_proto (__read_nocancel)
-hidden_proto (__pread64_nocancel)
-hidden_proto (__write_nocancel)
-hidden_proto (__close_nocancel)
-hidden_proto (__fcntl64_nocancel)
-#endif
-
 #endif /* NOT_CANCEL_H  */