From 47e9029456ea8f9bdc0cf054d7a4e703fba83c19 Mon Sep 17 00:00:00 2001 From: Paul Sajna Date: Mon, 29 Jan 2024 00:19:25 +0000 Subject: [PATCH] Use proper c_char ffi type --- veilid-tools/src/network_interfaces/netlink.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/veilid-tools/src/network_interfaces/netlink.rs b/veilid-tools/src/network_interfaces/netlink.rs index 8354a775..b8e3579a 100644 --- a/veilid-tools/src/network_interfaces/netlink.rs +++ b/veilid-tools/src/network_interfaces/netlink.rs @@ -26,7 +26,7 @@ cfg_if! { use std::convert::TryInto; use std::ffi::CStr; use std::io; -use std::os::raw::c_int; +use std::os::raw::{c_int, c_char}; use tools::*; fn get_interface_name(index: u32) -> io::Result { @@ -37,7 +37,7 @@ fn get_interface_name(index: u32) -> io::Result { bail_io_error_other!("if_indextoname returned null"); } } else { - if unsafe { if_indextoname(index, ifnamebuf.as_mut_ptr() as *mut i8) }.is_null() { + if unsafe { if_indextoname(index, ifnamebuf.as_mut_ptr() as *mut c_char) }.is_null() { bail_io_error_other!("if_indextoname returned null"); } }