Skip to content

Commit 2c87f5a

Browse files
committed
Auto merge of #312 - kamalmarhubi:android-fix-termios, r=posborne
android: Fix reference to libc::ioctl This fixes an import that was missed in the upgrade from libc 0.1 series to 0.2 series. Refs #298
2 parents 14580fc + 3a2fa59 commit 2c87f5a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/sys/termios.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ mod ffi {
4242
#[inline]
4343
#[cfg(all(target_os = "android", not(target_arch = "mips")))]
4444
mod android {
45-
use libc::funcs::bsd44::ioctl;
45+
use libc;
4646
use libc::c_int;
4747
use super::consts::*;
4848

@@ -69,24 +69,24 @@ mod ffi {
6969
0
7070
}
7171
pub unsafe fn tcgetattr(fd: c_int, termios: *mut Termios) -> c_int {
72-
ioctl(fd, TCGETS, termios)
72+
libc::ioctl(fd, TCGETS, termios)
7373
}
7474
pub unsafe fn tcsetattr(fd: c_int,
7575
optional_actions: c_int,
7676
termios: *const Termios) -> c_int {
77-
ioctl(fd, optional_actions, termios)
77+
libc::ioctl(fd, optional_actions, termios)
7878
}
7979
pub unsafe fn tcdrain(fd: c_int) -> c_int {
80-
ioctl(fd, TCSBRK, 1)
80+
libc::ioctl(fd, TCSBRK, 1)
8181
}
8282
pub unsafe fn tcflow(fd: c_int, action: c_int) -> c_int {
83-
ioctl(fd, TCXONC, action)
83+
libc::ioctl(fd, TCXONC, action)
8484
}
8585
pub unsafe fn tcflush(fd: c_int, action: c_int) -> c_int {
86-
ioctl(fd, TCFLSH, action)
86+
libc::ioctl(fd, TCFLSH, action)
8787
}
8888
pub unsafe fn tcsendbreak(fd: c_int, duration: c_int) -> c_int {
89-
ioctl(fd, TCSBRKP, duration)
89+
libc::ioctl(fd, TCSBRKP, duration)
9090
}
9191
}
9292

0 commit comments

Comments
 (0)