Skip to content

feat: add CARGO_FFMPEG_SYS_DISABLE_SIZE_T_IS_USIZE to make false condition #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
8 changes: 7 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,12 @@ fn main() {
.iter()
.map(|include| format!("-I{}", include.to_string_lossy()));

let size_t_is_usize_value = if env::var("CARGO_FFMPEG_SYS_DISABLE_SIZE_T_IS_USIZE").is_ok() {
false
} else {
true
};

// The bindgen::Builder is the main entry point
// to bindgen, and lets you build up options for
// the resulting bindings.
Expand Down Expand Up @@ -1170,7 +1176,7 @@ fn main() {
})
.prepend_enum_name(false)
.derive_eq(true)
.size_t_is_usize(true)
.size_t_is_usize(size_t_is_usize_value)
.parse_callbacks(Box::new(Callbacks));

// The input headers we would like to generate
Expand Down