mirror of
https://github.com/fluencelabs/wasmer
synced 2025-07-31 23:32:04 +00:00
keep fields in wasm
This commit is contained in:
@@ -102,9 +102,7 @@ pub struct GuestStat {
|
||||
st_gid: u32,
|
||||
st_rdev: u64,
|
||||
st_size: u32,
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
st_blksize: u32,
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
st_blocks: u32,
|
||||
st_atime: u64,
|
||||
st_mtime: u64,
|
||||
@@ -121,11 +119,15 @@ pub unsafe fn copy_stat_into_wasm(instance: &mut Instance, buf: u32, stat: &stat
|
||||
(*stat_ptr).st_gid = stat.st_gid as _;
|
||||
(*stat_ptr).st_rdev = stat.st_rdev as _;
|
||||
(*stat_ptr).st_size = stat.st_size as _;
|
||||
(*stat_ptr).st_blksize = 4096;
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
{
|
||||
(*stat_ptr).st_blksize = 4096;
|
||||
(*stat_ptr).st_blocks = stat.st_blocks as _;
|
||||
}
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
(*stat_ptr).st_blocks = 0;
|
||||
}
|
||||
(*stat_ptr).st_atime = stat.st_atime as _;
|
||||
(*stat_ptr).st_mtime = stat.st_mtime as _;
|
||||
(*stat_ptr).st_ctime = stat.st_ctime as _;
|
||||
|
Reference in New Issue
Block a user