Skip to content

Commit cd7380e

Browse files
authored
Merge pull request #537 from berkowski/master
Switched bsd speed_t def. to libc::speed_t
2 parents 54c2d8d + 6430c7e commit cd7380e

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/sys/termios.rs

+5-13
Original file line numberDiff line numberDiff line change
@@ -96,22 +96,14 @@ mod ffi {
9696

9797
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "openbsd", target_os = "netbsd"))]
9898
pub mod consts {
99-
#[cfg(not(any(target_os = "dragonfly", target_os = "netbsd")))]
100-
use libc::{c_int, c_ulong, c_uchar};
101-
#[cfg(any(target_os = "dragonfly", target_os = "netbsd"))]
102-
use libc::{c_int, c_uint, c_uchar};
10399

104-
#[cfg(not(any(target_os = "dragonfly", target_os = "netbsd")))]
105-
pub type tcflag_t = c_ulong;
106-
#[cfg(any(target_os = "dragonfly", target_os = "netbsd"))]
107-
pub type tcflag_t = c_uint;
100+
use libc;
108101

109-
pub type cc_t = c_uchar;
102+
use libc::{c_int, c_uint, c_ulong, c_uchar};
110103

111-
#[cfg(not(any(target_os = "dragonfly", target_os = "netbsd")))]
112-
pub type speed_t = c_ulong;
113-
#[cfg(any(target_os = "dragonfly", target_os = "netbsd"))]
114-
pub type speed_t = c_uint;
104+
pub type tcflag_t = libc::tcflag_t;
105+
pub type cc_t = libc::cc_t;
106+
pub type speed_t = libc::speed_t;
115107

116108
#[repr(C)]
117109
#[derive(Clone, Copy)]

0 commit comments

Comments
 (0)