From 6fafb81f02f7ab05b529bb574665c17b993cfa02 Mon Sep 17 00:00:00 2001 From: auronandace Date: Thu, 30 Apr 2026 08:56:19 +0100 Subject: [PATCH] verify sys_select header includes --- src/header/sys_select/cbindgen.toml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/header/sys_select/cbindgen.toml b/src/header/sys_select/cbindgen.toml index 36bfa1fcab..f89d7f7c09 100644 --- a/src/header/sys_select/cbindgen.toml +++ b/src/header/sys_select/cbindgen.toml @@ -1,5 +1,16 @@ -sys_includes = ["time.h", "signal.h"] +# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_select.h.html +# +# Spec quotations relating to includes: +# - "The header shall define the time_t and suseconds_t types as described in ." +# - "The header shall define the sigset_t type as described in ." +# - "The header shall define the timespec structure as described in ." +# - "Inclusion of the header may make visible all symbols from the headers and ." +sys_includes = ["sys/types.h"] +include_guard = "_RELIBC_SYS_SELECT_H" after_includes = """ +#include // for sigset_t from signal.h +#include // for timespec from time.h + // from musl license MIT { #define FD_SETSIZE 1024 @@ -19,7 +30,6 @@ typedef struct { #endif // } from musl license MIT """ -include_guard = "_SYS_SELECT_H" language = "C" style = "Tag" no_includes = true @@ -31,3 +41,6 @@ prefix_with_name = true [export] # fd_set is also defined in C (above) because cbindgen is incompatible with mem::size_of exclude = ["FD_SETSIZE", "fd_set"] + +[export.rename] +"timespec" = "struct timespec"