diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-05-24 22:54:05 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-05-24 22:54:05 -0400 |
commit | 594c827a22124ae550b9a877b8188e0898dff8db (patch) | |
tree | f48f403bf1b6aa543f20783fa501c573aaa3a63e /src/env | |
parent | 44d28e55121f9a7d736df59c09b963e17c8c4cfa (diff) | |
download | musl-594c827a22124ae550b9a877b8188e0898dff8db.tar.gz musl-594c827a22124ae550b9a877b8188e0898dff8db.tar.bz2 musl-594c827a22124ae550b9a877b8188e0898dff8db.tar.xz musl-594c827a22124ae550b9a877b8188e0898dff8db.zip |
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/env')
-rw-r--r-- | src/env/__libc_start_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/env/__libc_start_main.c b/src/env/__libc_start_main.c index 3498afbd..d7481c25 100644 --- a/src/env/__libc_start_main.c +++ b/src/env/__libc_start_main.c @@ -50,7 +50,7 @@ void __init_libc(char **envp, char *pn) struct pollfd pfd[3] = { {.fd=0}, {.fd=1}, {.fd=2} }; __syscall(SYS_poll, pfd, 3, 0); for (i=0; i<3; i++) if (pfd[i].revents&POLLNVAL) - if (__syscall(SYS_open, "/dev/null", O_RDWR|O_LARGEFILE)<0) + if (__sys_open("/dev/null", O_RDWR)<0) a_crash(); libc.secure = 1; } |