Skip to content

Commit 821fd8a

Browse files
committed
Fix style
1 parent 0b488bf commit 821fd8a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/unix/mod.rs

+10-4
Original file line numberDiff line numberDiff line change
@@ -1091,12 +1091,8 @@ extern {
10911091
pub fn tcdrain(fd: ::c_int) -> ::c_int;
10921092
pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t;
10931093
pub fn cfgetospeed(termios: *const ::termios) -> ::speed_t;
1094-
#[cfg(not(any(target_os = "solaris", target_os = "illumos")))]
1095-
pub fn cfmakeraw(termios: *mut ::termios);
10961094
pub fn cfsetispeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
10971095
pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
1098-
#[cfg(not(any(target_os = "solaris", target_os = "illumos")))]
1099-
pub fn cfsetspeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
11001096
pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int;
11011097
pub fn tcsetattr(fd: ::c_int,
11021098
optional_actions: ::c_int,
@@ -1129,6 +1125,16 @@ extern {
11291125
stream: *mut FILE) -> ssize_t;
11301126
}
11311127

1128+
cfg_if! {
1129+
if #[cfg(not(any(target_os = "solaris", target_os = "illumos")))] {
1130+
extern {
1131+
pub fn cfmakeraw(termios: *mut ::termios);
1132+
pub fn cfsetspeed(termios: *mut ::termios,
1133+
speed: ::speed_t) -> ::c_int;
1134+
}
1135+
}
1136+
}
1137+
11321138
cfg_if! {
11331139
if #[cfg(target_env = "uclibc")] {
11341140
mod uclibc;

0 commit comments

Comments
 (0)