Explorar o código

Support different types of ioctl request argument

ficapy %!s(int64=5) %!d(string=hai) anos
pai
achega
63cfe28ac9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/phy/sys/mod.rs

+ 1 - 1
src/phy/sys/mod.rs

@@ -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()) }
     }