about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/write.c')
-rw-r--r--sysdeps/unix/sysv/linux/write.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/write.c b/sysdeps/unix/sysv/linux/write.c
index d49514502e..f8896eb2e3 100644
--- a/sysdeps/unix/sysv/linux/write.c
+++ b/sysdeps/unix/sysv/linux/write.c
@@ -18,6 +18,7 @@
 
 #include <unistd.h>
 #include <sysdep-cancel.h>
+#include <not-cancel.h>
 
 /* Write NBYTES of BUF to FD.  Return the number written, or -1.  */
 ssize_t
@@ -31,3 +32,14 @@ weak_alias (__libc_write, __write)
 libc_hidden_weak (__write)
 weak_alias (__libc_write, write)
 libc_hidden_weak (write)
+
+#if !IS_IN (rtld)
+ssize_t
+__write_nocancel (int fd, const void *buf, size_t nbytes)
+{
+  return INLINE_SYSCALL_CALL (write, fd, buf, nbytes);
+}
+#else
+strong_alias (__libc_write, __write_nocancel)
+#endif
+libc_hidden_def (__write_nocancel)