From: Adhemerval Zanella Date: Mon, 24 Oct 2022 19:12:15 +0000 (-0300) Subject: Apply asm redirection in not-cancel before first use X-Git-Tag: glibc-2.37~195 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d227fd53cbbc9ae7e5604da3669d04b6ccb53aa1;p=thirdparty%2Fglibc.git 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 --- diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h index 93615de6817..d4f1e0fbde9 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 */