mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-21 13:41:20 +02:00
24 lines
1.0 KiB
Diff
24 lines
1.0 KiB
Diff
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" <bernhard.specht@pentlandfirth.com>
|
|
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::<i64>() 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) => {
|