path: root/src/stdio/fopen.c
diff options
authorRich Felker <>2014-05-24 22:54:05 -0400
committerRich Felker <>2014-05-24 22:54:05 -0400
commit594c827a22124ae550b9a877b8188e0898dff8db (patch)
treef48f403bf1b6aa543f20783fa501c573aaa3a63e /src/stdio/fopen.c
parent44d28e55121f9a7d736df59c09b963e17c8c4cfa (diff)
support kernels with no SYS_open syscall, only SYS_openat
open is handled specially because it is used from so many places, in so many variants (2 or 3 arguments, setting errno or not, and cancellable or not). trying to do it as a function would not only increase bloat, but would also risk subtle breakage. this is the first step towards supporting "new" archs where linux lacks "old" syscalls.
Diffstat (limited to 'src/stdio/fopen.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/fopen.c b/src/stdio/fopen.c
index da17ce8b..3d97cfa8 100644
--- a/src/stdio/fopen.c
+++ b/src/stdio/fopen.c
@@ -18,7 +18,7 @@ FILE *fopen(const char *restrict filename, const char *restrict mode)
/* Compute the flags to pass to open() */
flags = __fmodeflags(mode);
- fd = syscall_cp(SYS_open, filename, flags|O_LARGEFILE, 0666);
+ fd = sys_open_cp(filename, flags, 0666);
if (fd < 0) return 0;
f = __fdopen(fd, mode);