Open
Description
readv and writev are vectored versions of read/write which are included in POSIX. (See e.g. man 3p readv, writev .) They could be (and sometimes have been) implemented using a loop and many read or write calls, so their semantics are not unusual.
I was advised to make this issue by the following error message:
test test ... error: unsupported operation: can't call foreign function `readv` on OS `linux`
--> src/test.rs:125:19
|
125 | let ret = libc::readv(src_fd.as_raw_fd(), iovs.as_ptr(), iovs.len() as _);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't call foreign function `readv` on OS `linux`
|
= help: if this is a basic API commonly used on this target, please report an issue with Miri
= help: however, note that Miri does not aim to support every FFI function out there; for instance, we will not support APIs for things such as GUIs, scripting languages, or databases
A workaround for this error: under cfg(miri), replace libc::readv/libc::writev with functions that implement them using libc::read/libc::write directly.