summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/stdio/_READ.c2
-rw-r--r--libc/stdio/_WRITE.c2
-rw-r--r--libc/sysdeps/linux/common/pread_write.c8
3 files changed, 8 insertions, 4 deletions
diff --git a/libc/stdio/_READ.c b/libc/stdio/_READ.c
index 013ca0281..e27309c11 100644
--- a/libc/stdio/_READ.c
+++ b/libc/stdio/_READ.c
@@ -5,6 +5,8 @@
* Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
*/
+#define read __read
+
#include "_stdio.h"
/* Given a reading stream without its end-of-file indicator set and
diff --git a/libc/stdio/_WRITE.c b/libc/stdio/_WRITE.c
index 877d055f7..c2b0e7b5d 100644
--- a/libc/stdio/_WRITE.c
+++ b/libc/stdio/_WRITE.c
@@ -5,6 +5,8 @@
* Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
*/
+#define write __write
+
#include "_stdio.h"
/* Given a writing stream with no buffered output, write the
diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c
index 0019e05f6..7183ac9a7 100644
--- a/libc/sysdeps/linux/common/pread_write.c
+++ b/libc/sysdeps/linux/common/pread_write.c
@@ -109,10 +109,10 @@ static ssize_t __fake_pread_write(int fd, void *buf,
if (do_pwrite==1) {
/* Write the data. */
- result = write(fd, buf, count);
+ result = __write(fd, buf, count);
} else {
/* Read the data. */
- result = read(fd, buf, count);
+ result = __read(fd, buf, count);
}
/* Now we have to restore the position. If this fails we
@@ -147,10 +147,10 @@ static ssize_t __fake_pread_write64(int fd, void *buf,
if (do_pwrite==1) {
/* Write the data. */
- result = write(fd, buf, count);
+ result = __write(fd, buf, count);
} else {
/* Read the data. */
- result = read(fd, buf, count);
+ result = __read(fd, buf, count);
}
/* Now we have to restore the position. */