Patch-Source: https://github.com/raymanfx/libv4l-rs/pull/48/commits/aade3ba9014458a61fa08471c5c2fd8844c2ba73 (modified) -- From aade3ba9014458a61fa08471c5c2fd8844c2ba73 Mon Sep 17 00:00:00 2001 From: "b.specht" Date: Tue, 21 Dec 2021 10:45:28 +0100 Subject: [PATCH] Let rust figure out the type On certain platforms, like when cross-compiling to Android, strings are defined as `u8` instead of `i8`. diff --git a/src/device.rs b/src/device.rs index 3442005..be93790 100644 --- a/libv4l-rs/src/device.rs +++ b/libv4l-rs/src/device.rs @@ -265,7 +265,7 @@ impl Device { control.size = std::mem::size_of::() as u32; } control::Value::String(ref val) => { - control.__bindgen_anon_1.string = val.as_ptr() as *mut i8; + control.__bindgen_anon_1.string = val.as_ptr() as *mut _; control.size = val.len() as u32; } control::Value::CompoundU8(ref val) => {