Add sys/select.h to sys/types.h

This was triggered by gcc for some reason It included sys/types.h and
assumed sys/select.h to be there. And that seams to be the case in musl.

The problem with relibc here is that sys/types.h is are part of relibc
"include/*.h" files, while sys/select.h is generated by cbindgen. That
makes it impossible to #include select.h in types.h epsecially that
there are files like fcntl.c that uses types.h. They would complain
about missing headers. I fixed this by renaming sys/types.h to
sys/types_internal.h and then generating types.h using cbindgen as well
except for that. however fcntl and dlmalloc can include types_internal
instead of types.h
This commit is contained in:
oddcoder
2020-06-14 21:55:22 +02:00
parent a125b8be15
commit f4d95ce43f
6 changed files with 15 additions and 6 deletions
+1
View File
@@ -51,6 +51,7 @@ pub mod arch_aarch64_user;
pub mod arch_x64_user;
pub mod sys_procfs;
pub mod sys_random;
pub mod sys_types;
pub mod sys_uio;
pub mod sys_un;
pub mod sys_utsname;
+7
View File
@@ -0,0 +1,7 @@
sys_includes = ["stddef.h", "sys/types_internal.h", "sys/select.h"]
include_guard = "_SYS_TYPES_H"
language = "C"
style = "Tag"
[enum]
prefix_with_name = true
+2
View File
@@ -0,0 +1,2 @@
//! sys/types.h
use crate::platform::types::*;