File tree Expand file tree Collapse file tree 3 files changed +17
-12
lines changed Expand file tree Collapse file tree 3 files changed +17
-12
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,6 @@ pub trait MetadataExt {
6363 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
6464 fn st_ctime_nsec ( & self ) -> i64 ;
6565 #[ 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" ) ]
7066 fn st_blksize ( & self ) -> u64 ;
7167 #[ stable( feature = "metadata_ext2" , since = "1.8.0" ) ]
7268 fn st_blocks ( & self ) -> u64 ;
@@ -129,12 +125,6 @@ impl MetadataExt for Metadata {
129125 fn st_ctime_nsec ( & self ) -> i64 {
130126 self . as_inner ( ) . as_inner ( ) . st_ctime_nsec as i64
131127 }
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- }
138128 fn st_blksize ( & self ) -> u64 {
139129 self . as_inner ( ) . as_inner ( ) . st_blksize as u64
140130 }
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ const TMPBUF_SZ: usize = 128;
3636static ENV_LOCK : StaticMutex = StaticMutex :: new ( ) ;
3737
3838/// Returns the platform-specific value of errno
39+ #[ cfg( not( target_os = "dragonfly" ) ) ]
3940pub fn errno ( ) -> i32 {
4041 extern {
4142 #[ cfg_attr( any( target_os = "linux" , target_os = "emscripten" ) ,
@@ -47,7 +48,6 @@ pub fn errno() -> i32 {
4748 target_env = "newlib" ) ,
4849 link_name = "__errno" ) ]
4950 #[ cfg_attr( target_os = "solaris" , link_name = "___errno" ) ]
50- #[ cfg_attr( target_os = "dragonfly" , link_name = "__dfly_error" ) ]
5151 #[ cfg_attr( any( target_os = "macos" ,
5252 target_os = "ios" ,
5353 target_os = "freebsd" ) ,
@@ -60,6 +60,16 @@ pub fn errno() -> i32 {
6060 }
6161}
6262
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+
6373/// Gets a detailed string description for the given error number.
6474pub fn error_string ( errno : i32 ) -> String {
6575 extern {
Original file line number Diff line number Diff line change @@ -303,8 +303,13 @@ mod inner {
303303 }
304304 }
305305
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+
306311 impl Timespec {
307- pub fn now ( clock : libc :: c_int ) -> Timespec {
312+ pub fn now ( clock : clock_t ) -> Timespec {
308313 let mut t = Timespec {
309314 t : libc:: timespec {
310315 tv_sec : 0 ,
You can’t perform that action at this time.
0 commit comments