Work towards zipos / open(argv[0]) on metal (#667)

This commit is contained in:
tkchia 2022-11-06 15:29:47 +08:00 committed by GitHub
parent 543c93f623
commit cb9a0466f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 257 additions and 46 deletions

View file

@ -165,7 +165,7 @@ static int __zipos_load(struct Zipos *zipos, size_t cf, unsigned flags,
minfd = 3;
__fds_lock();
TryAgain:
if (IsWindows()) {
if (IsWindows() || IsMetal()) {
if ((fd = __reservefd_unlocked(-1)) != -1) {
return __zipos_setfd(fd, h, flags, mode);
}