From 594c827a22124ae550b9a877b8188e0898dff8db Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 24 May 2014 22:54:05 -0400 Subject: 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. --- src/env/__libc_start_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/env') 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; } -- cgit 1.4.1