summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-12-03 17:01:43 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-12-03 17:01:43 +0000
commitf2780946875817c41b8de1dadb1904652b697e60 (patch)
treeaedc1da7254c3a2fa4d2ec34fc00a618c6d55f21 /src
parent2f6196c11bd80cad75b0afe7676c376ae548c69e (diff)
parent4066476d0387f516e4b874d81cd413cc6783d4af (diff)
downloadnix-f2780946875817c41b8de1dadb1904652b697e60.zip
Merge #987
987: Fix builds on sparc64-unknown-linux-gnu r=asomers a=Susurrus Co-authored-by: Bryant Mairs <bryant@mai.rs>
Diffstat (limited to 'src')
-rw-r--r--src/sys/ioctl/linux.rs2
-rw-r--r--src/sys/ptrace/linux.rs2
-rw-r--r--src/sys/signal.rs10
-rw-r--r--src/sys/termios.rs23
4 files changed, 20 insertions, 17 deletions
diff --git a/src/sys/ioctl/linux.rs b/src/sys/ioctl/linux.rs
index 17c8cff9..750a1c98 100644
--- a/src/sys/ioctl/linux.rs
+++ b/src/sys/ioctl/linux.rs
@@ -14,7 +14,7 @@ pub const NRBITS: ioctl_num_type = 8;
#[doc(hidden)]
pub const TYPEBITS: ioctl_num_type = 8;
-#[cfg(any(target_arch = "mips", target_arch = "mips64", target_arch = "powerpc", target_arch = "powerpc64"))]
+#[cfg(any(target_arch = "mips", target_arch = "mips64", target_arch = "powerpc", target_arch = "powerpc64", target_arch = "sparc64"))]
mod consts {
#[doc(hidden)]
pub const NONE: u8 = 1;
diff --git a/src/sys/ptrace/linux.rs b/src/sys/ptrace/linux.rs
index fba1fe40..f10c6d83 100644
--- a/src/sys/ptrace/linux.rs
+++ b/src/sys/ptrace/linux.rs
@@ -10,7 +10,7 @@ use sys::signal::Signal;
pub type AddressType = *mut ::libc::c_void;
cfg_if! {
- if #[cfg(any(all(target_os = "linux", arch = "s390x"),
+ if #[cfg(any(all(target_os = "linux", target_arch = "s390x"),
all(target_os = "linux", target_env = "gnu")))] {
#[doc(hidden)]
pub type RequestType = ::libc::c_uint;
diff --git a/src/sys/signal.rs b/src/sys/signal.rs
index c2dd856c..c9826d72 100644
--- a/src/sys/signal.rs
+++ b/src/sys/signal.rs
@@ -39,7 +39,7 @@ libc_enum!{
SIGALRM,
SIGTERM,
#[cfg(all(any(target_os = "android", target_os = "emscripten", target_os = "linux"),
- not(any(target_arch = "mips", target_arch = "mips64"))))]
+ not(any(target_arch = "mips", target_arch = "mips64", target_arch = "sparc64"))))]
SIGSTKFLT,
SIGCHLD,
SIGCONT,
@@ -84,7 +84,7 @@ impl FromStr for Signal {
"SIGALRM" => Signal::SIGALRM,
"SIGTERM" => Signal::SIGTERM,
#[cfg(all(any(target_os = "android", target_os = "emscripten", target_os = "linux"),
- not(any(target_arch = "mips", target_arch = "mips64"))))]
+ not(any(target_arch = "mips", target_arch = "mips64", target_arch = "sparc64"))))]
"SIGSTKFLT" => Signal::SIGSTKFLT,
"SIGCHLD" => Signal::SIGCHLD,
"SIGCONT" => Signal::SIGCONT,
@@ -130,7 +130,7 @@ impl AsRef<str> for Signal {
Signal::SIGALRM => "SIGALRM",
Signal::SIGTERM => "SIGTERM",
#[cfg(all(any(target_os = "android", target_os = "emscripten", target_os = "linux"),
- not(any(target_arch = "mips", target_arch = "mips64"))))]
+ not(any(target_arch = "mips", target_arch = "mips64", target_arch = "sparc64"))))]
Signal::SIGSTKFLT => "SIGSTKFLT",
Signal::SIGCHLD => "SIGCHLD",
Signal::SIGCONT => "SIGCONT",
@@ -164,7 +164,7 @@ impl fmt::Display for Signal {
pub use self::Signal::*;
-#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), not(any(target_arch = "mips", target_arch = "mips64"))))]
+#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), not(any(target_arch = "mips", target_arch = "mips64", target_arch = "sparc64"))))]
const SIGNALS: [Signal; 31] = [
SIGHUP,
SIGINT,
@@ -197,7 +197,7 @@ const SIGNALS: [Signal; 31] = [
SIGIO,
SIGPWR,
SIGSYS];
-#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), any(target_arch = "mips", target_arch = "mips64")))]
+#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), any(target_arch = "mips", target_arch = "mips64", target_arch = "sparc64")))]
const SIGNALS: [Signal; 30] = [
SIGHUP,
SIGINT,
diff --git a/src/sys/termios.rs b/src/sys/termios.rs
index 8621cf0c..8a99c1ab 100644
--- a/src/sys/termios.rs
+++ b/src/sys/termios.rs
@@ -366,13 +366,13 @@ libc_enum!{
B1500000,
#[cfg(any(target_os = "android", target_os = "linux"))]
B2000000,
- #[cfg(any(target_os = "android", target_os = "linux"))]
+ #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))]
B2500000,
- #[cfg(any(target_os = "android", target_os = "linux"))]
+ #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))]
B3000000,
- #[cfg(any(target_os = "android", target_os = "linux"))]
+ #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))]
B3500000,
- #[cfg(any(target_os = "android", target_os = "linux"))]
+ #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))]
B4000000,
}
}
@@ -383,8 +383,9 @@ impl From<libc::speed_t> for BaudRate {
use libc::{B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400, B4800,
B9600, B19200, B38400, B57600, B115200, B230400};
#[cfg(any(target_os = "android", target_os = "linux"))]
- use libc::{B500000, B576000, B1000000, B1152000, B1500000, B2000000, B2500000, B3000000,
- B3500000, B4000000};
+ use libc::{B500000, B576000, B1000000, B1152000, B1500000, B2000000};
+ #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))]
+ use libc::{B2500000, B3000000, B3500000, B4000000};
#[cfg(any(target_os = "dragonfly",
target_os = "freebsd",
target_os = "macos",
@@ -463,13 +464,13 @@ impl From<libc::speed_t> for BaudRate {
B1500000 => BaudRate::B1500000,
#[cfg(any(target_os = "android", target_os = "linux"))]
B2000000 => BaudRate::B2000000,
- #[cfg(any(target_os = "android", target_os = "linux"))]
+ #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))]
B2500000 => BaudRate::B2500000,
- #[cfg(any(target_os = "android", target_os = "linux"))]
+ #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))]
B3000000 => BaudRate::B3000000,
- #[cfg(any(target_os = "android", target_os = "linux"))]
+ #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))]
B3500000 => BaudRate::B3500000,
- #[cfg(any(target_os = "android", target_os = "linux"))]
+ #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))]
B4000000 => BaudRate::B4000000,
b => unreachable!("Invalid baud constant: {}", b),
}
@@ -558,6 +559,7 @@ libc_enum! {
VINTR,
VKILL,
VLNEXT,
+ #[cfg(not(all(target_os = "linux", target_arch = "sparc64")))]
VMIN,
VQUIT,
VREPRINT,
@@ -574,6 +576,7 @@ libc_enum! {
VSWTC,
#[cfg(target_os = "haiku")]
VSWTCH,
+ #[cfg(not(all(target_os = "linux", target_arch = "sparc64")))]
VTIME,
VWERASE,
#[cfg(target_os = "dragonfly")]