wasm-micro-runtime/core/shared/platform/common/posix
komasayuki 67dc2ae0b2
Fix readdir for posix (#3339)
This PR fixes a readir for posix. readdir is not working correctly in rust.

The current WAMR's readdir implementation for posix is, if readdir returns 0,
it will exit with an error. But posix readdir returns 0 at the end of the directory.
To handle this correctly, if readdir returns 0, it should only raise an error if
errno has changed. We can reproduce it with the following rust code:

```rust
use std::fs;

fn main() {
    let entries  = fs::read_dir(".").unwrap();
    for entry in entries {
        println!("read_dir:{:?}", entry);
    }
}
```
2024-04-22 13:54:19 +08:00
..
platform_api_posix.cmake shared-platform: Remove dependency on shared-utils' bh_memory_remap_slow (#3153) 2024-02-17 13:44:33 +08:00
posix_blocking_op.c Remove a lot of "unused parameter" warnings (#3075) 2024-01-24 11:21:13 +08:00
posix_clock.c Remove a lot of "unused parameter" warnings (#3075) 2024-01-24 11:21:13 +08:00
posix_file.c Fix readdir for posix (#3339) 2024-04-22 13:54:19 +08:00
posix_malloc.c Add bh_print_proc_mem() to dump memory info of current process (#1734) 2022-11-25 08:33:44 +08:00
posix_memmap.c Implement memory64 for classic interpreter (#3266) 2024-04-02 15:22:07 +08:00
posix_sleep.c Implement os_usleep for posix (#2517) 2023-09-01 12:10:54 +08:00
posix_socket.c Fix some issues reported by CodeQL (#3064) 2024-01-23 21:38:30 +08:00
posix_thread.c Fix AOT compilation on MacOS (#3102) 2024-01-31 20:06:22 +08:00
posix_time.c Enhancements on wasm function execution time statistic (#2985) 2024-01-17 09:51:54 +08:00