File tree 3 files changed +17
-12
lines changed
3 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,6 @@ pub trait MetadataExt {
63
63
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
64
64
fn st_ctime_nsec ( & self ) -> i64 ;
65
65
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
66
- fn st_birthtime ( & self ) -> i64 ;
67
- #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
68
- fn st_birthtime_nsec ( & self ) -> i64 ;
69
- #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
70
66
fn st_blksize ( & self ) -> u64 ;
71
67
#[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
72
68
fn st_blocks ( & self ) -> u64 ;
@@ -129,12 +125,6 @@ impl MetadataExt for Metadata {
129
125
fn st_ctime_nsec ( & self ) -> i64 {
130
126
self . as_inner ( ) . as_inner ( ) . st_ctime_nsec as i64
131
127
}
132
- fn st_birthtime ( & self ) -> i64 {
133
- self . as_inner ( ) . as_inner ( ) . st_birthtime as i64
134
- }
135
- fn st_birthtime_nsec ( & self ) -> i64 {
136
- self . as_inner ( ) . as_inner ( ) . st_birthtime_nsec as i64
137
- }
138
128
fn st_blksize ( & self ) -> u64 {
139
129
self . as_inner ( ) . as_inner ( ) . st_blksize as u64
140
130
}
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ const TMPBUF_SZ: usize = 128;
36
36
static ENV_LOCK : StaticMutex = StaticMutex :: new ( ) ;
37
37
38
38
/// Returns the platform-specific value of errno
39
+ #[ cfg( not( target_os = "dragonfly" ) ) ]
39
40
pub fn errno ( ) -> i32 {
40
41
extern {
41
42
#[ cfg_attr( any( target_os = "linux" , target_os = "emscripten" ) ,
@@ -47,7 +48,6 @@ pub fn errno() -> i32 {
47
48
target_env = "newlib" ) ,
48
49
link_name = "__errno" ) ]
49
50
#[ cfg_attr( target_os = "solaris" , link_name = "___errno" ) ]
50
- #[ cfg_attr( target_os = "dragonfly" , link_name = "__dfly_error" ) ]
51
51
#[ cfg_attr( any( target_os = "macos" ,
52
52
target_os = "ios" ,
53
53
target_os = "freebsd" ) ,
@@ -60,6 +60,16 @@ pub fn errno() -> i32 {
60
60
}
61
61
}
62
62
63
+ #[ cfg( target_os = "dragonfly" ) ]
64
+ pub fn errno ( ) -> i32 {
65
+ extern {
66
+ #[ thread_local]
67
+ static errno: c_int ;
68
+ }
69
+
70
+ errno as i32
71
+ }
72
+
63
73
/// Gets a detailed string description for the given error number.
64
74
pub fn error_string ( errno : i32 ) -> String {
65
75
extern {
Original file line number Diff line number Diff line change @@ -303,8 +303,13 @@ mod inner {
303
303
}
304
304
}
305
305
306
+ #[ cfg( not( target_os = "dragonfly" ) ) ]
307
+ pub type clock_t = libc:: c_int ;
308
+ #[ cfg( target_os = "dragonfly" ) ]
309
+ pub type clock_t = libc:: c_ulong ;
310
+
306
311
impl Timespec {
307
- pub fn now ( clock : libc :: c_int ) -> Timespec {
312
+ pub fn now ( clock : clock_t ) -> Timespec {
308
313
let mut t = Timespec {
309
314
t : libc:: timespec {
310
315
tv_sec : 0 ,
You can’t perform that action at this time.
0 commit comments