Skip to content

Commit 29a2851

Browse files
authored
exclude ntzwapi.h in allowlist
1 parent 66f0eaf commit 29a2851

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/build.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,11 @@ mod regen {
100100

101101
pub fn generate_bindings(&self) -> Result<bindgen::Bindings, bindgen::BindgenError> {
102102
let allowlist_regexpr = Regex::new(&format!(
103-
r"({}\\deps\\phnt-nightly\\.*\.h)|winnt\.h|ntstatus\.h",
104-
regex::escape(env!("CARGO_MANIFEST_DIR"))
105-
))
106-
.unwrap();
107-
108-
let blocklist_regexpr = Regex::new(&format!(
109-
r"({}\\deps\\phnt-nightly\\ntzwapi\.h)",
103+
r"({}\\deps\\phnt-nightly\\(?!ntzwapi\.h$)[^\\/]*\.h)|winnt\.h|ntstatus\.h",
110104
regex::escape(env!("CARGO_MANIFEST_DIR"))
111105
))
112106
.unwrap();
113107

114-
115108
let blocklist_ty_regexpr =
116109
Regex::new(&format!(r"({})", self.blocklist_types.join("|"))).unwrap();
117110

@@ -157,7 +150,6 @@ mod regen {
157150
.raw_line(raw_lines.join("\r\n").as_str())
158151
.clang_args(clang_args)
159152
.allowlist_file(allowlist_regexpr.as_str())
160-
.blocklist_file(blocklist_regexpr.as_str())
161153
.blocklist_type(blocklist_ty_regexpr.as_str())
162154
.type_alias("NTSTATUS")
163155
.opaque_type("std::.*")

0 commit comments

Comments
 (0)