@@ -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