File tree 3 files changed +21
-7
lines changed
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/).
18
18
([ #722 ] ( https://github.com/nix-rust/nix/pull/722 ) )
19
19
- Added ` nix::unistd:fexecve ` .
20
20
([ #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 ) )
21
25
22
26
### Changed
23
27
- 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;
18
18
#[ macro_use]
19
19
pub mod ioctl;
20
20
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" ) ) ]
22
23
pub mod sendfile;
23
24
24
25
pub mod signal;
25
26
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" ) ) ]
28
28
pub mod signalfd;
29
29
30
30
pub mod socket;
@@ -39,7 +39,6 @@ pub mod reboot;
39
39
40
40
pub mod termios;
41
41
42
- #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
43
42
pub mod utsname;
44
43
45
44
pub 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 {
50
50
51
51
#[ cfg( test) ]
52
52
mod 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
+ }
54
64
65
+ #[ cfg( target_os = "freebsd" ) ]
55
66
#[ 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 " ) ;
58
69
}
59
70
}
You can’t perform that action at this time.
0 commit comments