Fix incompatible functions

This commit is contained in:
Jeremy Soller
2025-12-19 12:55:43 -07:00
parent 84c3ba910c
commit 3765148270
4 changed files with 13 additions and 8 deletions
+1 -1
View File
@@ -835,7 +835,7 @@ pub unsafe extern "C" fn pwrite(
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/read.html>.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn read(fildes: c_int, buf: *const c_void, nbyte: size_t) -> ssize_t {
pub unsafe extern "C" fn read(fildes: c_int, buf: *mut c_void, nbyte: size_t) -> ssize_t {
let buf = unsafe { slice::from_raw_parts_mut(buf as *mut u8, nbyte as usize) };
trace_expr!(
Sys::read(fildes, buf)