Skip to content

std doesn't build for x86_64-wrs-vxworks: no pread/pwrite on the target #160043

Description

@physwkim

x86_64-wrs-vxworks still can't build std after #159991: sys/fd/unix.rs:32,406
import libc::pread/pwrite, which the target doesn't have, so -Zbuild-std
stops with two error[E0432]. libc dropped its polyfills in rust-lang/libc#5129
(0.2.187) and won't bring them back — rust-lang/libc#5328: "These are just stub
so I'd keep them removed. Like killpg, fixing std by returning unsupported
would be better."

They're only reached from FileExt::read_at/read_buf_at/write_at, and
lseek + read isn't a substitute since it isn't atomic. So: branch them
per-target — as read_vectored does for espidf/horizon/vita/nuttx at
sys/fd/unix.rs:127 — and return ErrorKind::Unsupported on vxworks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-vxworksTarget: when they made us, they called us Curiosity, and Spirit, and told us to tell you helloT-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions