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:
@@ -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 = """
|
||||
|
||||
Reference in New Issue
Block a user