Skip to content

Commit 67ae092

Browse files
authored
Merge pull request #553 from berkowski/fix_ppc
Compile on all travis platforms
2 parents d82b535 + 3c5355d commit 67ae092

File tree

5 files changed

+29
-6
lines changed

5 files changed

+29
-6
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
9191
implementations).
9292

9393
### Fixed
94+
- Fixed multiple issues compiling under different archetectures and OSes.
95+
Now compiles on Linux/MIPS ([#538](https://github.com/nix-rust/nix/pull/538)),
96+
`Linux/PPC` ([#553](https://github.com/nix-rust/nix/pull/553)),
97+
`MacOS/x86_64,i686` ([#553](https://github.com/nix-rust/nix/pull/553),
98+
and `NetBSD/x64_64` ([#538](https://github.com/nix-rust/nix/pull/538).
9499
- Fixed multiple issues with Unix domain sockets on non-Linux OSes
95100
([#474](https://github.com/nix-rust/nix/pull/415))
96101
- Fixed using kqueue with `EVFILT_USER` on FreeBSD

src/sys/socket/consts.rs

+12-4
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ mod test {
420420

421421
#[cfg(target_os = "linux")]
422422
#[test]
423-
pub fn test_linux_consts() {
423+
pub fn test_general_linux_consts() {
424424
// TODO Figure out how to test new constants
425425
check_const!(
426426
SOL_IP,
@@ -434,13 +434,21 @@ mod test {
434434
TCP_CORK,
435435
// SO_BUSY_POLL,
436436
// SO_RXQ_OVFL,
437-
SO_PASSCRED,
438437
SO_PRIORITY,
439438
// SO_PROTOCOL,
440439
SO_RCVBUFFORCE,
441440
// SO_PEEK_OFF,
442-
SO_PEERCRED,
443-
SO_SNDBUFFORCE,
444441
MSG_ERRQUEUE);
445442
}
443+
444+
#[cfg(all(target_os = "linux", not(target_arch="arm")))]
445+
#[test]
446+
pub fn test_linux_not_arm_consts() {
447+
// TODO Figure out how to test new constants
448+
check_const!(
449+
SO_PASSCRED,
450+
SO_PEERCRED,
451+
SO_SNDBUFFORCE);
452+
}
453+
446454
}

src/sys/socket/sockopt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ impl<'a> Set<'a, usize> for SetUsize {
378378

379379
#[cfg(test)]
380380
mod test {
381-
#[cfg(target_os = "linux")]
381+
#[cfg(all(target_os = "linux", not(target_arch = "arm")))]
382382
#[test]
383383
fn can_get_peercred_on_unix_socket() {
384384
use super::super::*;

src/sys/syscall.rs

+10
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ mod arch {
5454
pub static MEMFD_CREATE: Syscall = 354;
5555
}
5656

57+
#[cfg(target_arch = "powerpc")]
58+
mod arch {
59+
use libc::c_long;
60+
61+
pub type Syscall = c_long;
62+
63+
pub static SYSPIVOTROOT: Syscall = 203;
64+
pub static MEMFD_CREATE: Syscall = 360;
65+
}
66+
5767
extern {
5868
pub fn syscall(num: Syscall, ...) -> c_int;
5969
}

src/sys/termios.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ mod ffi {
9999

100100
use libc;
101101

102-
use libc::{c_int, c_uint, c_ulong, c_uchar};
102+
use libc::c_int;
103103

104104
pub type tcflag_t = libc::tcflag_t;
105105
pub type cc_t = libc::cc_t;

0 commit comments

Comments
 (0)