File tree Expand file tree Collapse file tree 3 files changed +21
-7
lines changed
Expand file tree Collapse file tree 3 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1818 ([ #722 ] ( https://github.com/nix-rust/nix/pull/722 ) )
1919- Added ` nix::unistd:fexecve ` .
2020 ([ #727 ] ( https://github.com/nix-rust/nix/pull/727 ) )
21+ - Expose ` uname() ` on all platforms.
22+ ([ #739 ] ( https://github.com/nix-rust/nix/pull/739 ) )
23+ - Expose ` signalfd ` module on Android as well.
24+ ([ #739 ] ( https://github.com/nix-rust/nix/pull/739 ) )
2125
2226### Changed
2327- Renamed existing ` ptrace ` wrappers to encourage namespacing ([ #692 ] ( https://github.com/nix-rust/nix/pull/692 ) )
Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ pub mod memfd;
1818#[ macro_use]
1919pub mod ioctl;
2020
21- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
21+ // TODO: Add support for dragonfly, freebsd, and ios/macos.
22+ #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
2223pub mod sendfile;
2324
2425pub mod signal;
2526
26- // FIXME: Add to Android once libc#671 lands in a release
27- #[ cfg( target_os = "linux" ) ]
27+ #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
2828pub mod signalfd;
2929
3030pub mod socket;
@@ -39,7 +39,6 @@ pub mod reboot;
3939
4040pub mod termios;
4141
42- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
4342pub mod utsname;
4443
4544pub mod wait;
Original file line number Diff line number Diff line change @@ -50,10 +50,21 @@ fn to_str<'a>(s: *const *const c_char) -> &'a str {
5050
5151#[ cfg( test) ]
5252mod test {
53- use super :: uname;
53+ #[ cfg( target_os = "linux" ) ]
54+ #[ test]
55+ pub fn test_uname_linux ( ) {
56+ assert_eq ! ( super :: uname( ) . sysname( ) , "Linux" ) ;
57+ }
58+
59+ #[ cfg( any( target_os = "macos" , target_os = "ios" ) ) ]
60+ #[ test]
61+ pub fn test_uname_darwin ( ) {
62+ assert_eq ! ( super :: uname( ) . sysname( ) , "Darwin" ) ;
63+ }
5464
65+ #[ cfg( target_os = "freebsd" ) ]
5566 #[ test]
56- pub fn test_uname ( ) {
57- assert_eq ! ( uname( ) . sysname( ) , "Linux " ) ;
67+ pub fn test_uname_freebsd ( ) {
68+ assert_eq ! ( super :: uname( ) . sysname( ) , "FreeBSD " ) ;
5869 }
5970}
You can’t perform that action at this time.
0 commit comments