* [PATCH proxmox-datacenter-manager] cli/proxmox-fido2: fix mismatched type on other arches
@ 2026-10-21 12:51 Luke Yasuda
2026-10-21 14:15 ` Michael Köppl
0 siblings, 1 reply; 2+ messages in thread
From: Luke Yasuda @ 2026-10-21 12:51 UTC (permalink / raw)
To: pve-devel; +Cc: Luke Yasuda
This fixes FTBFS on non-amd64 platforms: mismatched types, expected u8
but got i8.
---
This is more like an RFC, and I have little experience in rust
and don't know what I'm doing, but it builds and passes the tests.
---
cli/proxmox-fido2/src/lib.rs | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/cli/proxmox-fido2/src/lib.rs b/cli/proxmox-fido2/src/lib.rs
index afed3496..5413b9c0 100644
--- a/cli/proxmox-fido2/src/lib.rs
+++ b/cli/proxmox-fido2/src/lib.rs
@@ -1,5 +1,5 @@
use std::error::Error as StdError;
-use std::ffi::{CStr, CString, OsStr, c_int, c_void};
+use std::ffi::{CStr, CString, OsStr, c_int, c_void, c_char};
use std::fmt;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
@@ -92,7 +92,7 @@ impl Dl {
pub struct Lib {
_lib: Dl,
fido_init: extern "C" fn(c_int),
- fido_strerr: extern "C" fn(c_int) -> *const i8,
+ fido_strerr: extern "C" fn(c_int) -> *const c_char,
fido_dev_new: extern "C" fn() -> *mut c_void,
fido_dev_free: extern "C" fn(&mut *mut c_void),
@@ -101,22 +101,22 @@ pub struct Lib {
fido_dev_cancel: extern "C" fn(*mut c_void),
fido_dev_is_fido2: extern "C" fn(*mut c_void) -> c_int,
fido_dev_get_cbor_info: extern "C" fn(*mut c_void, *mut c_void) -> c_int,
- fido_dev_make_cred: extern "C" fn(*mut c_void, *mut c_void, *const i8) -> c_int,
- fido_dev_get_assert: extern "C" fn(*mut c_void, *mut c_void, *const i8) -> c_int,
+ fido_dev_make_cred: extern "C" fn(*mut c_void, *mut c_void, *const c_char) -> c_int,
+ fido_dev_get_assert: extern "C" fn(*mut c_void, *mut c_void, *const c_char) -> c_int,
fido_dev_info_new: extern "C" fn(libc::size_t) -> *mut c_void,
fido_dev_info_free: extern "C" fn(&mut *mut c_void, libc::size_t),
fido_dev_info_manifest: extern "C" fn(*mut c_void, libc::size_t, *mut libc::size_t) -> c_int,
fido_dev_info_ptr: extern "C" fn(*mut c_void, libc::size_t) -> *mut c_void,
- fido_dev_info_manufacturer_string: extern "C" fn(*mut c_void) -> *const i8,
- fido_dev_info_path: extern "C" fn(*mut c_void) -> *const i8,
- fido_dev_info_product_string: extern "C" fn(*mut c_void) -> *const i8,
+ fido_dev_info_manufacturer_string: extern "C" fn(*mut c_void) -> *const c_char,
+ fido_dev_info_path: extern "C" fn(*mut c_void) -> *const c_char,
+ fido_dev_info_product_string: extern "C" fn(*mut c_void) -> *const c_char,
fido_dev_get_touch_begin: extern "C" fn(*mut c_void) -> c_int,
fido_dev_get_touch_status: extern "C" fn(*mut c_void, *mut c_int, c_int) -> c_int,
fido_cbor_info_new: extern "C" fn() -> *mut c_void,
fido_cbor_info_free: extern "C" fn(&mut *mut c_void),
- fido_cbor_info_extensions_ptr: extern "C" fn(*mut c_void) -> *const *const i8,
+ fido_cbor_info_extensions_ptr: extern "C" fn(*mut c_void) -> *const *const c_char,
fido_cbor_info_extensions_len: extern "C" fn(*mut c_void) -> libc::size_t,
fido_cbor_info_options_name_ptr: extern "C" fn(*mut c_void) -> *const *const i8,
fido_cbor_info_options_value_ptr: extern "C" fn(*mut c_void) -> *const i8,
@@ -126,16 +126,16 @@ pub struct Lib {
fido_cred_free: extern "C" fn(&mut *mut c_void),
fido_cred_exclude: extern "C" fn(*mut c_void, *const u8, libc::size_t) -> c_int,
fido_cred_set_extensions: extern "C" fn(*mut c_void, c_int) -> c_int,
- fido_cred_set_rp: extern "C" fn(*mut c_void, *const i8, *const i8) -> c_int,
- fido_cred_set_fmt: extern "C" fn(*mut c_void, *const i8) -> c_int,
+ fido_cred_set_rp: extern "C" fn(*mut c_void, *const c_char, *const c_char) -> c_int,
+ fido_cred_set_fmt: extern "C" fn(*mut c_void, *const c_char) -> c_int,
fido_cred_set_type: extern "C" fn(*mut c_void, c_int) -> c_int,
fido_cred_set_user: extern "C" fn(
*mut c_void,
*const u8,
libc::size_t,
- *const i8,
- *const i8,
- *const i8,
+ *const c_char,
+ *const c_char,
+ *const c_char,
) -> c_int,
fido_cred_set_clientdata_hash: extern "C" fn(*mut c_void, *const u8, libc::size_t) -> c_int,
fido_cred_set_rk: extern "C" fn(*mut c_void, FidoOpt) -> c_int,
@@ -154,7 +154,7 @@ pub struct Lib {
fido_assert_free: extern "C" fn(&mut *mut c_void),
fido_assert_set_extensions: extern "C" fn(*mut c_void, c_int) -> c_int,
fido_assert_set_hmac_salt: extern "C" fn(*mut c_void, *const u8, libc::size_t) -> c_int,
- fido_assert_set_rp: extern "C" fn(*mut c_void, *const i8) -> c_int,
+ fido_assert_set_rp: extern "C" fn(*mut c_void, *const c_char) -> c_int,
fido_assert_set_clientdata_hash: extern "C" fn(*mut c_void, *const u8, libc::size_t) -> c_int,
fido_assert_allow_cred: extern "C" fn(*mut c_void, *const u8, libc::size_t) -> c_int,
fido_assert_set_up: extern "C" fn(*mut c_void, FidoOpt) -> c_int,
@@ -692,7 +692,7 @@ impl FidoDev {
let extensions = (self.lib.fido_cbor_info_extensions_ptr)(info.info);
if !extensions.is_null() {
let len = (self.lib.fido_cbor_info_extensions_len)(info.info);
- let extensions = unsafe { std::slice::from_raw_parts(extensions as *const &i8, len) };
+ let extensions = unsafe { std::slice::from_raw_parts(extensions as *const &c_char, len) };
for ext in extensions {
let name = unsafe { CStr::from_ptr(*ext) };
if name.to_bytes() == b"hmac-secret" {
@@ -712,7 +712,7 @@ impl FidoDev {
let len = (self.lib.fido_cbor_info_options_len)(info.info);
let option_names =
- unsafe { std::slice::from_raw_parts(option_names as *const &i8, len) };
+ unsafe { std::slice::from_raw_parts(option_names as *const &c_char, len) };
let option_values = unsafe { std::slice::from_raw_parts(option_values, len) };
for (name, value) in std::iter::zip(option_names, option_values) {
--
2.55.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH proxmox-datacenter-manager] cli/proxmox-fido2: fix mismatched type on other arches
2026-10-21 12:51 [PATCH proxmox-datacenter-manager] cli/proxmox-fido2: fix mismatched type on other arches Luke Yasuda
@ 2026-10-21 14:15 ` Michael Köppl
0 siblings, 0 replies; 2+ messages in thread
From: Michael Köppl @ 2026-10-21 14:15 UTC (permalink / raw)
To: Luke Yasuda, pve-devel
Hi! Thanks for your contribution. Please instead send this to
pdm-devel@lists.proxmox.com to make sure that the maintainers of PDM see
it.
On Wed Oct 21, 2026 at 2:51 PM CEST, Luke Yasuda wrote:
> This fixes FTBFS on non-amd64 platforms: mismatched types, expected u8
> but got i8.
> ---
> This is more like an RFC, and I have little experience in rust
> and don't know what I'm doing, but it builds and passes the tests.
> ---
> cli/proxmox-fido2/src/lib.rs | 32 ++++++++++++++++----------------
> 1 file changed, 16 insertions(+), 16 deletions(-)
>
[snip]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-21 14:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-21 12:51 [PATCH proxmox-datacenter-manager] cli/proxmox-fido2: fix mismatched type on other arches Luke Yasuda
2026-10-21 14:15 ` Michael Köppl
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.