diff --git a/src/header/sys_utsname/cbindgen.toml b/src/header/sys_utsname/cbindgen.toml index 484e2d0c52..4a5ff660d4 100644 --- a/src/header/sys_utsname/cbindgen.toml +++ b/src/header/sys_utsname/cbindgen.toml @@ -1,7 +1,7 @@ # POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_utsname.h.html # # There are no spec quotations relating to includes -include_guard = "_SYS_UTSNAME_H" +include_guard = "_RELIBC_SYS_UTSNAME_H" language = "C" style = "Tag" no_includes = true diff --git a/src/header/tar/cbindgen.toml b/src/header/tar/cbindgen.toml index 7a96512046..ca3ee9617c 100644 --- a/src/header/tar/cbindgen.toml +++ b/src/header/tar/cbindgen.toml @@ -1,7 +1,13 @@ # POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/tar.h.html # # There are no spec quotations relating to includes -include_guard = "_TAR_H" +include_guard = "_RELIBC_TAR_H" +# cbindgen cannot export Rust &str +after_includes = """ + +#define TMAGIC "ustar" +#define TVERSION "00" +""" language = "C" style = "Tag" no_includes = true diff --git a/src/header/tar/mod.rs b/src/header/tar/mod.rs index 4b575f3e87..ee7c595482 100644 --- a/src/header/tar/mod.rs +++ b/src/header/tar/mod.rs @@ -54,8 +54,10 @@ pub const FIFOTYPE: u8 = b'6'; // FIFO special pub const CONTTYPE: u8 = b'7'; // Contiguous file /// tar format magic and version +/// cbindgen:ignore pub const TMAGIC: &str = "ustar"; // Magic string : ustar and a null pub const TMAGLEN: usize = 6; // Length of the magic string +/// cbindgen:ignore pub const TVERSION: &str = "00"; // Version string pub const TVERSLEN: usize = 2; // Length of the version string