//
// SPDX-License-Identifier: BSD-2-Clause
-#include <common/errno.h>
-
#include <wasi/api.h>
#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <unistd.h>
-int faccessat(int fd, const char *path, int amode, int flag) {
+int __wasilibc_nocwd_faccessat(int fd, const char *path, int amode, int flag) {
// Validate function parameters.
if ((amode & ~(F_OK | R_OK | W_OK | X_OK)) != 0 ||
(flag & ~AT_EACCESS) != 0) {
__wasi_lookupflags_t lookup_flags = __WASI_LOOKUPFLAGS_SYMLINK_FOLLOW;
__wasi_filestat_t file;
__wasi_errno_t error =
- __wasi_path_filestat_get(fd, lookup_flags, path, strlen(path), &file);
+ __wasi_path_filestat_get(fd, lookup_flags, path, &file);
if (error != 0) {
- errno = errno_fixup_directory(fd, error);
return -1;
}