diff --git a/src/header/grp/cbindgen.toml b/src/header/grp/cbindgen.toml index 5383c8adf6..35dc5bcf32 100644 --- a/src/header/grp/cbindgen.toml +++ b/src/header/grp/cbindgen.toml @@ -2,7 +2,11 @@ # # Spec quotations relating to includes: # - "The header shall define the gid_t and size_t types as described in ." -sys_includes = ["sys/types.h"] +sys_includes = [] +after_includes = """ +#include // for gid_t from sys/types.h +#include // for size_t from sys/types.h +""" include_guard = "_RELIBC_GRP_H" language = "C" style = "Tag" diff --git a/src/header/grp/mod.rs b/src/header/grp/mod.rs index 3177c1bb36..60b4e5730c 100644 --- a/src/header/grp/mod.rs +++ b/src/header/grp/mod.rs @@ -84,6 +84,7 @@ static mut GROUP: group = group { static LINE_READER: SyncUnsafeCell>>> = SyncUnsafeCell::new(None); /// See . +#[allow(non_camel_case_types)] #[repr(C)] #[derive(Debug)] pub struct group { @@ -312,7 +313,7 @@ pub unsafe extern "C" fn getgrgid_r( gid: gid_t, result_buf: *mut group, buffer: *mut c_char, - buflen: usize, + buflen: size_t, result: *mut *mut group, ) -> c_int { // In case of error or the requested entry is not found. @@ -373,7 +374,7 @@ pub unsafe extern "C" fn getgrnam_r( name: *const c_char, result_buf: *mut group, buffer: *mut c_char, - buflen: usize, + buflen: size_t, result: *mut *mut group, ) -> c_int { let Ok(db) = File::open(GROUP_FILE.into(), fcntl::O_RDONLY) else {