Skip to content

Commit

Permalink
Support different types of ioctl request argument
Browse files Browse the repository at this point in the history
  • Loading branch information
ficapy authored and whitequark committed Dec 15, 2019
1 parent 23464ad commit 63cfe28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/phy/sys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()) }
}

Expand Down

0 comments on commit 63cfe28

Please sign in to comment.