diff --git a/src/header/sys_timerfd/cbindgen.toml b/src/header/sys_timerfd/cbindgen.toml index 06b1634604..79ced7361f 100644 --- a/src/header/sys_timerfd/cbindgen.toml +++ b/src/header/sys_timerfd/cbindgen.toml @@ -5,8 +5,8 @@ # in relibc. It is required by Qt6 for QSocketNotifier and many other # C programs that use timer file descriptors. # -# Includes the itimerspec from . -sys_includes = ["signal.h", "stdint.h", "stddef.h"] +# Includes clockid_t and struct itimerspec from . +sys_includes = ["signal.h", "stdint.h", "time.h", "stddef.h"] include_guard = "_SYS_TIMERFD_H" trailer = """ #ifndef TFD_CLOEXEC @@ -36,3 +36,12 @@ cpp_compat = true [enum] prefix_with_name = true + +# Do NOT auto-generate C prototypes from the Rust fn signatures: cbindgen +# renders them with a bare `itimerspec` (rather than `struct itimerspec`) and a +# `clockid_t` parameter, neither of which resolves in a plain C99 include of this +# header, which broke every consumer that probes it (e.g. libwayland's +# TFD_CLOEXEC feature test, gating the whole Wayland stack). The hand-written, +# correct prototypes are emitted from the `trailer` above instead. +[export] +exclude = ["timerfd_create", "timerfd_settime", "timerfd_gettime"]