summaryrefslogtreecommitdiff
path: root/src/sys/termios.rs
diff options
context:
space:
mode:
authorZac Berkowitz <zac.berkowitz@gmail.com>2017-02-26 20:01:01 +0000
committerBryant Mairs <bryant@mai.rs>2017-04-09 07:41:58 -0700
commita859ee3c9396dfdb118fcc2c8ecc697e2d303467 (patch)
tree4501cb9b78799918827802c6343f4e1bf7091e12 /src/sys/termios.rs
parent22c37c25f9ea479fe84e613d3059f1a4099af5fc (diff)
downloadnix-a859ee3c9396dfdb118fcc2c8ecc697e2d303467.zip
Switched bsd speed_t def. to libc::speed_t
Diffstat (limited to 'src/sys/termios.rs')
-rw-r--r--src/sys/termios.rs18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/sys/termios.rs b/src/sys/termios.rs
index e8df1ed9..db80cc2d 100644
--- a/src/sys/termios.rs
+++ b/src/sys/termios.rs
@@ -96,22 +96,14 @@ mod ffi {
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))]
pub mod consts {
- #[cfg(not(any(target_os = "dragonfly", target_os = "netbsd")))]
- use libc::{c_int, c_ulong, c_uchar};
- #[cfg(any(target_os = "dragonfly", target_os = "netbsd"))]
- use libc::{c_int, c_uint, c_uchar};
- #[cfg(not(any(target_os = "dragonfly", target_os = "netbsd")))]
- pub type tcflag_t = c_ulong;
- #[cfg(any(target_os = "dragonfly", target_os = "netbsd"))]
- pub type tcflag_t = c_uint;
+ use libc;
- pub type cc_t = c_uchar;
+ use libc::{c_int, c_uint, c_ulong, c_uchar};
- #[cfg(not(any(target_os = "dragonfly", target_os = "netbsd")))]
- pub type speed_t = c_ulong;
- #[cfg(any(target_os = "dragonfly", target_os = "netbsd"))]
- pub type speed_t = c_uint;
+ pub type tcflag_t = libc::tcflag_t;
+ pub type cc_t = libc::cc_t;
+ pub type speed_t = libc::speed_t;
#[repr(C)]
#[derive(Clone, Copy)]