summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/i386/s_pread64.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/s_pread64.S')
-rw-r--r--sysdeps/unix/sysv/linux/i386/s_pread64.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/s_pread64.S b/sysdeps/unix/sysv/linux/i386/s_pread64.S
index 22ce79b3f0..9e14aa815f 100644
--- a/sysdeps/unix/sysv/linux/i386/s_pread64.S
+++ b/sysdeps/unix/sysv/linux/i386/s_pread64.S
@@ -18,6 +18,7 @@
Boston, MA 02111-1307, USA. */
#include <sysdep.h>
+#include <asm/errno.h>
/* Please consult the file sysdeps/unix/sysv/linux/i386/sysdep.h for
more information about the value -4095 used below.*/
@@ -25,6 +26,13 @@
.text
ENTRY (__syscall_pread64)
+#ifndef __NR_pread
+ movl $-ENOSYS,%eax
+# ifndef PIC
+ jmp syscall_error
+# endif
+#else
+
PUSHARGS_5 /* Save register contents. */
/* Load arguments. This is unfortunately a little bit of a problem
@@ -41,5 +49,6 @@ ENTRY (__syscall_pread64)
cmpl $-4095, %eax /* Check %eax for error. */
jae syscall_error /* Jump to error handler if error. */
ret /* Return to caller. */
+#endif
PSEUDO_END (__syscall_pread64)