Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/vxworks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1867,19 +1867,29 @@ safe_f! {
}
}

pub fn pread(_fd: ::c_int, _buf: *mut ::c_void, _count: ::size_t, _offset: off64_t) -> ::ssize_t {
pub unsafe fn pread(
_fd: ::c_int,
_buf: *mut ::c_void,
_count: ::size_t,
_offset: off64_t,
) -> ::ssize_t {
-1
}

pub fn pwrite(
pub unsafe fn pwrite(
_fd: ::c_int,
_buf: *const ::c_void,
_count: ::size_t,
_offset: off64_t,
) -> ::ssize_t {
-1
}
pub fn posix_memalign(memptr: *mut *mut ::c_void, align: ::size_t, size: ::size_t) -> ::c_int {

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 *)
if (align & align - 1 != 0) || (align as usize % size_of::<::size_t>() != 0) {
Expand Down