summaryrefslogtreecommitdiff
path: root/src/unix/mod.rs
diff options
context:
space:
mode:
authorJason King <jason.brian.king@gmail.com>2019-02-12 02:28:17 +0000
committerJason King <jason.brian.king@gmail.com>2019-02-12 02:28:17 +0000
commit821fd8a9dd1eead13887ec7ca8200effcf6de4f2 (patch)
treed53a7e4d49fc87a2a94dbea9b3353dd55a710d6c /src/unix/mod.rs
parent0b488bf94b2600c524e1e297347c764833f3d21e (diff)
downloadrust-libc-821fd8a9dd1eead13887ec7ca8200effcf6de4f2.tar.gz
Fix style
Diffstat (limited to 'src/unix/mod.rs')
-rw-r--r--src/unix/mod.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 618bfa9ff6..972c2c0dae 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -1091,12 +1091,8 @@ extern {
pub fn tcdrain(fd: ::c_int) -> ::c_int;
pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t;
pub fn cfgetospeed(termios: *const ::termios) -> ::speed_t;
- #[cfg(not(any(target_os = "solaris", target_os = "illumos")))]
- pub fn cfmakeraw(termios: *mut ::termios);
pub fn cfsetispeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
- #[cfg(not(any(target_os = "solaris", target_os = "illumos")))]
- pub fn cfsetspeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int;
pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int;
pub fn tcsetattr(fd: ::c_int,
optional_actions: ::c_int,
@@ -1130,6 +1126,16 @@ extern {
}
cfg_if! {
+ if #[cfg(not(any(target_os = "solaris", target_os = "illumos")))] {
+ extern {
+ pub fn cfmakeraw(termios: *mut ::termios);
+ pub fn cfsetspeed(termios: *mut ::termios,
+ speed: ::speed_t) -> ::c_int;
+ }
+ }
+}
+
+cfg_if! {
if #[cfg(target_env = "uclibc")] {
mod uclibc;
pub use self::uclibc::*;