diff --git a/src/header/unistd/mod.rs b/src/header/unistd/mod.rs index 590546ddbd..19d57a280f 100644 --- a/src/header/unistd/mod.rs +++ b/src/header/unistd/mod.rs @@ -21,7 +21,13 @@ use crate::{ time::timespec, }, out::Out, - platform::{self, ERRNO, Pal, Sys, types::*}, + platform::{ + self, ERRNO, Pal, Sys, + types::{ + c_char, c_int, c_long, c_short, c_uint, c_ulonglong, c_void, gid_t, off_t, pid_t, + size_t, ssize_t, suseconds_t, time_t, uid_t, useconds_t, + }, + }, }; pub use self::{brk::*, getopt::*, getpass::getpass, pathconf::*, sysconf::*}; @@ -197,7 +203,7 @@ pub extern "C" fn close(fildes: c_int) -> c_int { /// See . #[unsafe(no_mangle)] -pub extern "C" fn confstr(name: c_int, buf: *mut c_char, len: size_t) -> size_t { +pub unsafe extern "C" fn confstr(name: c_int, buf: *mut c_char, len: size_t) -> size_t { // confstr returns the number of bytes required to hold the string INCLUDING the NUL // terminator. This is different from other C functions hence the + 1. match name { @@ -1002,7 +1008,7 @@ pub extern "C" fn sleep(seconds: c_uint) -> c_uint { /// See . #[unsafe(no_mangle)] -pub extern "C" fn swab(src: *const c_void, dest: *mut c_void, nbytes: ssize_t) { +pub unsafe extern "C" fn swab(src: *const c_void, dest: *mut c_void, nbytes: ssize_t) { if nbytes <= 0 { return; }