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
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ fn generate_bindings(ffmpeg_include_dir: &Path, headers: &[PathBuf]) -> Bindings
.clang_arg(format!("-I{}", ffmpeg_include_dir))
// Workaround: https://github.com/rust-lang/rust-bindgen/issues/2159
.blocklist_type("__mingw_ldbl_type_t")
// The C library's functions that Rust's standard library also uses: FFmpeg's headers include
// <string.h>, and bindgen declares them with `c_ulong` for `size_t` where std has `usize`, which
// rustc warns about (`suspicious_runtime_symbol_definitions`). They aren't FFmpeg's API
.blocklist_function("memcpy|memmove|memset|memcmp|bcmp|strlen")
// Stop bindgen from prefixing enums
.prepend_enum_name(false)
},
Expand Down
38 changes: 0 additions & 38 deletions src/binding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5650,20 +5650,6 @@ extern "C" {
pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int)
-> ::std::os::raw::c_int;
}
extern "C" {
pub fn memcpy(
__dest: *mut ::std::os::raw::c_void,
__src: *const ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn memmove(
__dest: *mut ::std::os::raw::c_void,
__src: *const ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn memccpy(
__dest: *mut ::std::os::raw::c_void,
Expand All @@ -5672,20 +5658,6 @@ extern "C" {
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn memset(
__s: *mut ::std::os::raw::c_void,
__c: ::std::os::raw::c_int,
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn memcmp(
__s1: *const ::std::os::raw::c_void,
__s2: *const ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn __memcmpeq(
__s1: *const ::std::os::raw::c_void,
Expand Down Expand Up @@ -5917,9 +5889,6 @@ extern "C" {
__n: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong;
}
extern "C" {
pub fn strnlen(__string: *const ::std::os::raw::c_char, __maxlen: usize) -> usize;
}
Expand All @@ -5940,13 +5909,6 @@ extern "C" {
__l: locale_t,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn bcmp(
__s1: *const ::std::os::raw::c_void,
__s2: *const ::std::os::raw::c_void,
__n: ::std::os::raw::c_ulong,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bcopy(
__src: *const ::std::os::raw::c_void,
Expand Down