From d2f6329f587de23a8945e174a606065bd7c4e8d9 Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Sun, 31 May 2026 18:05:11 +0200 Subject: [PATCH] vxworks: ensure kernel symbols are not exposed Deprecate uses of kernel symbols. Rust has support only for RTP programs. Removep polyfill routines. They were stubs. They returned error values. They don't exist in VxWorks. --- src/new/vxworks/mod.rs | 3 +++ src/vxworks/mod.rs | 15 ++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/new/vxworks/mod.rs b/src/new/vxworks/mod.rs index 65630565e53e0..31600129daab0 100644 --- a/src/new/vxworks/mod.rs +++ b/src/new/vxworks/mod.rs @@ -1,4 +1,7 @@ //! VxWorks libc. +//! +//! VxWorks allows compiling different types of programs. The `libc` crate only +//! supports RTPs. Refer to the RTP definitions in case of discrepancy. // FIXME(vxworks): link to headers needed. pub(crate) mod unistd; diff --git a/src/vxworks/mod.rs b/src/vxworks/mod.rs index a5f5c6908960c..aab92c65c59a5 100644 --- a/src/vxworks/mod.rs +++ b/src/vxworks/mod.rs @@ -58,7 +58,12 @@ pub type pthread_key_t = c_ulong; // From b_off_t.h pub type off_t = c_longlong; -pub type off64_t = off_t; + +#[deprecated( + since = "0.2.187", + note = "Kernel mode definitions are unsupported. Use `off_t` instead." +)] +pub type off64_t = c_longlong; // From b_BOOL.h pub type BOOL = c_int; @@ -2414,14 +2419,6 @@ safe_f! { } } -pub unsafe fn pread(_fd: c_int, _buf: *mut c_void, _count: size_t, _offset: off64_t) -> ssize_t { - -1 -} - -pub unsafe fn pwrite(_fd: c_int, _buf: *const c_void, _count: size_t, _offset: off64_t) -> ssize_t { - -1 -} - pub unsafe fn posix_memalign(memptr: *mut *mut c_void, align: size_t, size: size_t) -> c_int { // check to see if align is a power of 2 and if align is a multiple // of sizeof(void *)