mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
Use proper c_char ffi type
This commit is contained in:
parent
9e690408c9
commit
47e9029456
@ -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