mirror of
https://github.com/fluencelabs/musl
synced 2025-07-03 08:32:05 +00:00
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.
This commit is contained in:
@ -22,7 +22,7 @@ char *realpath(const char *restrict filename, char *restrict resolved)
|
||||
return 0;
|
||||
}
|
||||
|
||||
fd = syscall(SYS_open, filename, O_PATH|O_NONBLOCK|O_CLOEXEC|O_LARGEFILE);
|
||||
fd = sys_open(filename, O_PATH|O_NONBLOCK|O_CLOEXEC);
|
||||
if (fd < 0) return 0;
|
||||
__procfdname(buf, fd);
|
||||
|
||||
|
Reference in New Issue
Block a user