wasm-micro-runtime/core/shared
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
..
coap Apply clang-format for core/shared and product-mini files (#785) 2021-10-14 09:12:07 +08:00
mem-alloc Fix warnings/issues reported in Windows and by CodeQL/Coverity (#3275) 2024-04-07 11:57:31 +08:00
platform Fix readdir for posix (#3339) 2024-04-22 13:54:19 +08:00
utils Fix warnings/issues reported in Windows and by CodeQL/Coverity (#3275) 2024-04-07 11:57:31 +08:00