diff --git a/src/header/sys_ioctl/cbindgen.toml b/src/header/sys_ioctl/cbindgen.toml index 64117641a7..66ec318eec 100644 --- a/src/header/sys_ioctl/cbindgen.toml +++ b/src/header/sys_ioctl/cbindgen.toml @@ -1,7 +1,5 @@ -include_guard = "_SYS_IOCTL_H" -language = "C" -style = "Tag" -trailer = """ +include_guard = "_RELIBC_SYS_IOCTL_H" +after_includes = """ // Shamelessly copy-pasted from musl #define _IOC(a,b,c,d) ( ((a)<<30) | ((b)<<8) | (c) | ((d)<<16) ) @@ -14,6 +12,8 @@ trailer = """ #define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c)) #define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c)) """ +language = "C" +style = "Tag" no_includes = true cpp_compat = true diff --git a/src/header/termios/cbindgen.toml b/src/header/termios/cbindgen.toml index 85d08f0d90..459e6e609f 100644 --- a/src/header/termios/cbindgen.toml +++ b/src/header/termios/cbindgen.toml @@ -2,7 +2,10 @@ # # Spec quotations relating to includes: # - "The header shall define the pid_t type as described in ." -sys_includes = ["sys/types.h"] +sys_includes = [] +after_includes = """ +#include // for pid_t from sys/types.h +""" include_guard = "_RELIBC_TERMIOS_H" language = "C" style = "Tag" diff --git a/src/header/termios/mod.rs b/src/header/termios/mod.rs index 5bd8de3318..8d40c09e3f 100644 --- a/src/header/termios/mod.rs +++ b/src/header/termios/mod.rs @@ -3,16 +3,15 @@ //! See . use crate::{ - header::{ - errno, - sys_ioctl::{self, winsize}, - }, + header::{errno, sys_ioctl}, platform::{ self, types::{c_int, c_uchar, c_uint, c_ulong, c_void, pid_t}, }, }; +pub use crate::header::sys_ioctl::winsize; + pub use self::sys::*; #[cfg(target_os = "linux")]