We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0caf49 commit 8d5a85cCopy full SHA for 8d5a85c
src/bsd/ifconfig.rs
@@ -3,7 +3,7 @@ use std::{
3
os::fd::AsRawFd,
4
};
5
6
-use libc::kld_load;
+use libc::{c_char, kld_load};
7
use nix::{ioctl_readwrite, ioctl_write_ptr, sys::socket::AddressFamily};
8
9
use super::{
@@ -49,7 +49,8 @@ impl IfReq {
49
let mod_name = format!("if_{if_name}");
50
unsafe {
51
// Ignore the return value for the time being.
52
- kld_load(mod_name.as_ptr());
+ // Do the cast because `c_char` differs across platforms.
53
+ kld_load(mod_name.as_ptr() as *const c_char);
54
}
55
56
Self {
0 commit comments