File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,52 +65,6 @@ pub fn last_os_error() -> i32 {
6565 std:: io:: Error :: last_os_error ( ) . raw_os_error ( ) . unwrap_or ( 0 )
6666}
6767
68- /// Returns the last OS error (errno).
69- ///
70- /// Currently supported on `no_std`:
71- /// * Linux
72- /// * Android
73- /// * macOS
74- /// * FreeBSD
75- /// * Dragonfly
76- /// * OpenBSD
77- /// * NetBSD
78- #[ must_use]
79- #[ cfg( all(
80- not( feature = "std" ) ,
81- any(
82- target_os = "linux" ,
83- target_os = "android" ,
84- target_os = "macos" ,
85- target_os = "freebsd" ,
86- target_os = "dragonfly" ,
87- target_os = "openbsd" ,
88- target_os = "netbsd"
89- )
90- ) ) ]
91- pub fn last_os_error ( ) -> i32 {
92- unsafe {
93- #[ cfg( target_os = "linux" ) ]
94- {
95- * libc:: __errno_location ( )
96- }
97- #[ cfg( target_os = "android" ) ]
98- {
99- * libc:: __errno ( )
100- }
101- #[ cfg( any(
102- target_os = "macos" ,
103- target_os = "freebsd" ,
104- target_os = "dragonfly" ,
105- target_os = "openbsd" ,
106- target_os = "netbsd"
107- ) ) ]
108- {
109- * libc:: __error ( )
110- }
111- }
112- }
113-
11468/// Waits for a pid and returns the status
11569#[ must_use]
11670#[ cfg( unix) ]
You can’t perform that action at this time.
0 commit comments