Skip to content

Commit 05d2e60

Browse files
alexcrichtontgross35
authored andcommitted
Gate __wasilibc_register_preopened_fd on WASI
This API is only available in WASIp1 and as the libc build for WASIp2 is changing the symbol was recently deleted. This functionality makes sense for WASIp1, but for WASIp2 it's a fundamentally different set of syscalls so this is no longer provided by libc.
1 parent a5e5c0d commit 05d2e60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/wasi/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@ extern "C" {
793793
timeout: *const timeval,
794794
) -> c_int;
795795

796+
#[cfg(target_env = "p1")]
796797
pub fn __wasilibc_register_preopened_fd(fd: c_int, path: *const c_char) -> c_int;
797798
pub fn __wasilibc_fd_renumber(fd: c_int, newfd: c_int) -> c_int;
798799
pub fn __wasilibc_unlinkat(fd: c_int, path: *const c_char) -> c_int;

0 commit comments

Comments
 (0)