diff --git a/include/bits/dirent.h b/include/bits/dirent.h deleted file mode 100644 index 6fb5ed37b6..0000000000 --- a/include/bits/dirent.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _BITS_DIRENT_H -#define _BITS_DIRENT_H - -// Shamelessly stolen from musl -#define DT_UNKNOWN 0 -#define DT_FIFO 1 -#define DT_CHR 2 -#define DT_DIR 4 -#define DT_BLK 6 -#define DT_REG 8 -#define DT_LNK 10 -#define DT_SOCK 12 -#define DT_WHT 14 -#define IFTODT(x) ((x)>>12 & 017) -#define DTTOIF(x) ((x)<<12) - -#endif /* _BITS_DIRENT_H */ diff --git a/src/header/dirent/cbindgen.toml b/src/header/dirent/cbindgen.toml index 00821b46f0..6445e03377 100644 --- a/src/header/dirent/cbindgen.toml +++ b/src/header/dirent/cbindgen.toml @@ -6,7 +6,20 @@ sys_includes = ["sys/types.h"] include_guard = "_RELIBC_DIRENT_H" language = "C" style = "Both" -trailer = "#include " +trailer = """ +// Shamelessly stolen from musl +#define DT_UNKNOWN 0 +#define DT_FIFO 1 +#define DT_CHR 2 +#define DT_DIR 4 +#define DT_BLK 6 +#define DT_REG 8 +#define DT_LNK 10 +#define DT_SOCK 12 +#define DT_WHT 14 +#define IFTODT(x) ((x)>>12 & 017) +#define DTTOIF(x) ((x)<<12) +""" no_includes = true cpp_compat = true