Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions bindgen-tests/tests/headers/macro-fallback-include-builtin.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// bindgen-flags: --clang-macro-fallback --allowlist-item TEST
// Ensures that the fallback path for macros doesn't silently
// fail because of builtin headers not being found.

#include <stddef.h>

#define TEST ((size_t)42)
5 changes: 4 additions & 1 deletion bindgen/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,10 @@ impl Bindings {
for path in search_paths {
if let Ok(path) = path.into_os_string().into_string() {
options.clang_args.push("-isystem".into());
options.clang_args.push(path.into_boxed_str());
options.clang_args.push(path.clone().into_boxed_str());

options.fallback_clang_args.push("-isystem".into());
options.fallback_clang_args.push(path.into_boxed_str());
}
}
}
Expand Down
Loading