X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2F__fopen_rb_ca.c;h=183a5d553895537199ca452bc593ea69ea77e146;hb=3a23cd06b08054f81bf904c414e0d083a56248f2;hp=9202c8ce5c1423b33bdfc571cd93d16db2d4af5b;hpb=c6d441e3a246370d9c459396ec22b096db93850e;p=musl diff --git a/src/stdio/__fopen_rb_ca.c b/src/stdio/__fopen_rb_ca.c index 9202c8ce..183a5d55 100644 --- a/src/stdio/__fopen_rb_ca.c +++ b/src/stdio/__fopen_rb_ca.c @@ -6,8 +6,9 @@ FILE *__fopen_rb_ca(const char *filename, FILE *f, unsigned char *buf, size_t le { memset(f, 0, sizeof *f); - f->fd = syscall(SYS_open, filename, O_RDONLY|O_LARGEFILE|O_CLOEXEC, 0); + f->fd = sys_open(filename, O_RDONLY|O_CLOEXEC); if (f->fd < 0) return 0; + __syscall(SYS_fcntl, f->fd, F_SETFD, FD_CLOEXEC); f->flags = F_NOWR | F_PERM; f->buf = buf + UNGET;