Support different types of ioctl request argument
This commit is contained in:
parent
b7725a4d6b
commit
d01e23e396
|
@ -75,7 +75,7 @@ fn ifreq_for(name: &str) -> ifreq {
|
|||
fn ifreq_ioctl(lower: libc::c_int, ifreq: &mut ifreq,
|
||||
cmd: libc::c_ulong) -> io::Result<libc::c_int> {
|
||||
unsafe {
|
||||
let res = libc::ioctl(lower, cmd, ifreq as *mut ifreq);
|
||||
let res = libc::ioctl(lower, cmd as _, ifreq as *mut ifreq);
|
||||
if res == -1 { return Err(io::Error::last_os_error()) }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue