Skip to content

libc 0.2.187 dropped pread/pwrite for vxworks, but std still imports them #5328

Description

@physwkim

x86_64-wrs-vxworks can't build std with libc 0.2.187 or later. No SDK needed
to reproduce:

cargo new vxcheck && cd vxcheck
cargo +nightly check -Zbuild-std=std,panic_abort --target x86_64-wrs-vxworks

pread/pwrite were dropped from the vxworks module in #5129, but std still
imports them for this target (sys/fd/unix.rs:32,406), so two E0432. They're
still listed in libc-test/semver/vxworks.txt.

VxWorks defines neither: nm over the wrsdk-vxworks7-qemu-1.17.0 sysroot and
kernel finds nothing for them, so they'd have to be shims again, as they were up
to 0.2.186. A shim returns -1 without setting errno though, and std's cvt
reads last_os_error(), so maybe std shouldn't call them here at all.

Would you be open to bringing the shims back, or is this better fixed on the std
side?

(The same build also stops on killpg, but that one is only a std problem —
VxWorks has no process groups at all, so there's nothing for libc to declare:
rust-lang/rust#159969)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions