relibc: dirent/stdlib/unistd headers must include <features.h> for __deprecated

The relibc bump added #[deprecated] to readdir_r (and others); cbindgen emits
'__deprecated' (globdefs deprecated=__deprecated), which is #defined in
features.h. But dirent/stdlib/unistd generate with no_includes and never pulled
features.h, so a C unit that includes <dirent.h> before anything that defines
__deprecated fails: 'expected ; before int' (broke htop and any <dirent.h>
consumer). Added '#include <features.h>' to each header's cbindgen after_includes.
This commit is contained in:
2026-07-28 18:20:16 +09:00
parent b3ae554bd9
commit a359fb6155
3 changed files with 3 additions and 0 deletions
+1
View File
@@ -15,6 +15,7 @@
sys_includes = ["stddef.h", "sys/wait.h", "stdint.h"]
include_guard = "_RELIBC_STDLIB_H"
after_includes = """
#include <features.h> // __deprecated
#include <bits/open-flags.h> // for O_* constants, shared with fcntl.h
"""
trailer = """