From 0e2f24125a95017de47aec16e5414aa03b269fba Mon Sep 17 00:00:00 2001 From: "Ibuki.O" Date: Wed, 20 May 2026 12:11:11 +0900 Subject: [PATCH] fix: Fix fstatat by passing O_PATH when calling openat2 --- src/platform/redox/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/redox/mod.rs b/src/platform/redox/mod.rs index a9334730be..25b7d1a786 100644 --- a/src/platform/redox/mod.rs +++ b/src/platform/redox/mod.rs @@ -480,7 +480,7 @@ impl Pal for Sys { } } - let file = openat2(dirfd, path, flags, 0)?; + let file = openat2(dirfd, path, flags, fcntl::O_PATH)?; // Close the file descriptor after fstat(2) regardless of success or failure. let fstat_res = unsafe { libredox::fstat(*file as usize, buf.as_mut_ptr()) }; let close_res = syscall::close(*file as usize);