projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix double-processing of DT_RELR relocations in ldso relocating itself
[musl]
/
src
/
stdio
/
__stdio_read.c
diff --git
a/src/stdio/__stdio_read.c
b/src/stdio/__stdio_read.c
index
909c36a
..
ea675da
100644
(file)
--- a/
src/stdio/__stdio_read.c
+++ b/
src/stdio/__stdio_read.c
@@
-9,7
+9,8
@@
size_t __stdio_read(FILE *f, unsigned char *buf, size_t len)
};
ssize_t cnt;
- cnt = syscall(SYS_readv, f->fd, iov, 2);
+ cnt = iov[0].iov_len ? syscall(SYS_readv, f->fd, iov, 2)
+ : syscall(SYS_read, f->fd, iov[1].iov_base, iov[1].iov_len);
if (cnt <= 0) {
f->flags |= cnt ? F_ERR : F_EOF;
return 0;