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