From fdfab223c5858c0012b52f1fe0df29db1e89a6ee Mon Sep 17 00:00:00 2001 From: auronandace Date: Wed, 13 May 2026 14:56:46 +0100 Subject: [PATCH 1/2] fix threads header and gnu-binutils compilation --- src/header/sys_resource/cbindgen.toml | 4 +++- src/header/threads/cbindgen.toml | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/header/sys_resource/cbindgen.toml b/src/header/sys_resource/cbindgen.toml index 43b32e07c4..3d0766cec4 100644 --- a/src/header/sys_resource/cbindgen.toml +++ b/src/header/sys_resource/cbindgen.toml @@ -1,5 +1,7 @@ +# stdint.h needed for uint64_t due to rlim_t and constants u64 +# TODO POSIX says rlim_t can be unsigned int but including stdint.h is considered namespace pollution # sys/time.h brings in sys/select.h which brings in bits/timeval.h -sys_includes = ["sys/time.h"] +sys_includes = ["stdint.h", "sys/time.h"] after_includes = """ #include // for id_t from sys/types.h """ diff --git a/src/header/threads/cbindgen.toml b/src/header/threads/cbindgen.toml index 4e762f277d..2a2fe5f5fd 100644 --- a/src/header/threads/cbindgen.toml +++ b/src/header/threads/cbindgen.toml @@ -1,4 +1,5 @@ -sys_includes = [] +# features.h required for Rust never type (no return) +sys_includes = ["features.h"] include_guard = "_RELIBC_THREADS_H" language = "C" style = "tag" From 14daa9b6d6212a1f9b6d8eeec6992ad59e73cbf2 Mon Sep 17 00:00:00 2001 From: auronandace Date: Wed, 13 May 2026 15:01:32 +0100 Subject: [PATCH 2/2] threads should include time header according to spec --- src/header/threads/cbindgen.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/header/threads/cbindgen.toml b/src/header/threads/cbindgen.toml index 2a2fe5f5fd..da0c37e405 100644 --- a/src/header/threads/cbindgen.toml +++ b/src/header/threads/cbindgen.toml @@ -1,5 +1,6 @@ +# time.h brings in features.h # features.h required for Rust never type (no return) -sys_includes = ["features.h"] +sys_includes = ["time.h"] include_guard = "_RELIBC_THREADS_H" language = "C" style = "tag"