diff --git a/src/header/sys_mman/cbindgen.toml b/src/header/sys_mman/cbindgen.toml
index 1fecef571c3c4253da90ff9ad31807e0a4b65daa..2b34e52f6502fa22b2a08d90be294dce4dadf1cb 100644
--- a/src/header/sys_mman/cbindgen.toml
+++ b/src/header/sys_mman/cbindgen.toml
@@ -4,5 +4,9 @@ trailer = "#include <bits/sys/mman.h>"
 language = "C"
 style = "Tag"
 
+[defines]
+"target_os=linux" = "__linux__"
+"target_os=redox" = "__redox__"
+
 [enum]
 prefix_with_name = true