diff --git a/src/header/_aio/cbindgen.toml b/src/header/_aio/cbindgen.toml index fd387cb50e..596c950abc 100644 --- a/src/header/_aio/cbindgen.toml +++ b/src/header/_aio/cbindgen.toml @@ -1,4 +1,8 @@ -sys_includes = [] +# signal brings in sigevent, size_t and timespec +sys_includes = ["signal.h"] +after_includes = """ +#include // for ssize_t from sys/types.h +""" include_guard = "_RELIBC_AIO_H" language = "C" style = "Tag" diff --git a/src/header/_aio/mod.rs b/src/header/_aio/mod.rs index 2dbbc70938..1baafd0ef9 100644 --- a/src/header/_aio/mod.rs +++ b/src/header/_aio/mod.rs @@ -4,7 +4,7 @@ use crate::{ header::{signal::sigevent, time::timespec}, - platform::types::{c_int, c_void}, + platform::types::{c_int, c_void, size_t, ssize_t}, }; /// See . @@ -13,25 +13,25 @@ pub struct aiocb { pub aio_lio_opcode: c_int, pub aio_reqprio: c_int, pub aio_buf: *mut c_void, - pub aio_nbytes: usize, + pub aio_nbytes: size_t, pub aio_sigevent: sigevent, } /// See . // #[unsafe(no_mangle)] -pub extern "C" fn aio_read(aiocbp: *mut aiocb) -> c_int { +pub unsafe extern "C" fn aio_read(aiocbp: *mut aiocb) -> c_int { unimplemented!(); } /// See . // #[unsafe(no_mangle)] -pub extern "C" fn aio_write(aiocbp: *mut aiocb) -> c_int { +pub unsafe extern "C" fn aio_write(aiocbp: *mut aiocb) -> c_int { unimplemented!(); } /// See . // #[unsafe(no_mangle)] -pub extern "C" fn lio_listio( +pub unsafe extern "C" fn lio_listio( mode: c_int, list: *const *const aiocb, nent: c_int, @@ -42,25 +42,25 @@ pub extern "C" fn lio_listio( /// See . // #[unsafe(no_mangle)] -pub extern "C" fn aio_error(aiocbp: *const aiocb) -> c_int { +pub unsafe extern "C" fn aio_error(aiocbp: *const aiocb) -> c_int { unimplemented!(); } /// See . // #[unsafe(no_mangle)] -pub extern "C" fn aio_return(aiocbp: *mut aiocb) -> usize { +pub unsafe extern "C" fn aio_return(aiocbp: *mut aiocb) -> ssize_t { unimplemented!(); } /// See . // #[unsafe(no_mangle)] -pub extern "C" fn aio_cancel(fildes: c_int, aiocbp: *mut aiocb) -> c_int { +pub unsafe extern "C" fn aio_cancel(fildes: c_int, aiocbp: *mut aiocb) -> c_int { unimplemented!(); } /// See . // #[unsafe(no_mangle)] -pub extern "C" fn aio_suspend( +pub unsafe extern "C" fn aio_suspend( list: *const *const aiocb, nent: c_int, timeout: *const timespec, @@ -70,6 +70,6 @@ pub extern "C" fn aio_suspend( /// See . // #[unsafe(no_mangle)] -pub extern "C" fn aio_fsync(operation: c_int, aiocbp: *mut aiocb) -> c_int { +pub unsafe extern "C" fn aio_fsync(operation: c_int, aiocbp: *mut aiocb) -> c_int { unimplemented!(); } diff --git a/src/header/dl-tls/cbindgen.toml b/src/header/dl-tls/cbindgen.toml index c09ca25349..6bffa9e5b7 100644 --- a/src/header/dl-tls/cbindgen.toml +++ b/src/header/dl-tls/cbindgen.toml @@ -1,5 +1,5 @@ sys_includes = [] -include_guard = "_DL_TLS_H" +include_guard = "_RELIBC_DL_TLS_H" language = "C" style = "Tag" no_includes = true diff --git a/src/header/netinet_ip/cbindgen.toml b/src/header/netinet_ip/cbindgen.toml index 11f2e66c4c..6dcb1636e7 100644 --- a/src/header/netinet_ip/cbindgen.toml +++ b/src/header/netinet_ip/cbindgen.toml @@ -1,5 +1,5 @@ sys_includes = [] -include_guard = "_NETINET_IP_H" +include_guard = "_RELIBC_NETINET_IP_H" language = "C" style = "Tag" no_includes = true