mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-12-24 06:49:38 -05:00
Merge branch 'sajattack-main-patch-13365' into 'main'
Use proper c_char FFI type See merge request veilid/veilid!251
This commit is contained in:
commit
9f795ef520
@ -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<String> {
|
||||
@ -37,7 +37,7 @@ fn get_interface_name(index: u32) -> io::Result<String> {
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user