diff --git a/src/header/unistd/cbindgen.toml b/src/header/unistd/cbindgen.toml index 187a0d64f0..40efcf9247 100644 --- a/src/header/unistd/cbindgen.toml +++ b/src/header/unistd/cbindgen.toml @@ -1,6 +1,13 @@ -sys_includes = ["stddef.h", "stdint.h", "sys/types.h", "features.h", "fcntl.h"] +# stddef.h brings in size_t and NULL +# fcntl.h brings in sys/stat.h bringing in off_t, gid_t and uid_t +# fcntl.h brings in pid_t +# bits/useconds-t.h brings in features.h (for deprecated annotations) +sys_includes = ["stddef.h", "stdint.h", "fcntl.h"] include_guard = "_RELIBC_UNISTD_H" after_includes = """ +#include // for ssize_t from sys/types.h +// for deprecated ualarm and usleep +#include // for useconds_t from sys/types.h #define _POSIX_VERSION 200809L #define _POSIX_BARRIERS 202405L diff --git a/src/header/unistd/mod.rs b/src/header/unistd/mod.rs index 90e1615c86..14a9003da8 100644 --- a/src/header/unistd/mod.rs +++ b/src/header/unistd/mod.rs @@ -9,7 +9,7 @@ use core::{ ptr, slice, }; -#[allow(deprecated)] +#[expect(deprecated)] use crate::platform::types::useconds_t; use crate::{ c_str::CStr,