diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs index 501f0684945a4ae7c96fad6b665fdab24d9d9484..3fbd389403c35b56b2455d2226e4bd38206fee2b 100644 --- a/src/unix/linux_like/linux/musl/mod.rs +++ b/src/unix/linux_like/linux/musl/mod.rs @@ -1,5 +1,11 @@ pub type pthread_t = *mut ::c_void; pub type clock_t = c_long; +#[deprecated( + since = "0.2.80", + note = "This type is changed to 64-bit in musl 1.2.0, \ + we'll follow that change in the future release. \ + See #1848 for more info." +)] pub type time_t = c_long; pub type suseconds_t = c_long; pub type ino_t = u64; diff --git a/src/unix/mod.rs b/src/unix/mod.rs index ef24a1cb339bb30772171bac44453317c727afdb..d3b43769fe40081d217dfeb3e02648e893e4801c 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -1315,23 +1315,33 @@ extern "C" { pub fn res_init() -> ::c_int; #[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")] + #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; #[cfg_attr(target_os = "netbsd", link_name = "__localtime_r50")] + #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "mktime$UNIX2003" )] #[cfg_attr(target_os = "netbsd", link_name = "__mktime50")] + #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` pub fn mktime(tm: *mut tm) -> time_t; #[cfg_attr(target_os = "netbsd", link_name = "__time50")] + #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` pub fn time(time: *mut time_t) -> time_t; #[cfg_attr(target_os = "netbsd", link_name = "__gmtime50")] + #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` pub fn gmtime(time_p: *const time_t) -> *mut tm; #[cfg_attr(target_os = "netbsd", link_name = "__locatime50")] + #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` pub fn localtime(time_p: *const time_t) -> *mut tm; #[cfg_attr(target_os = "netbsd", link_name = "__difftime50")] + #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` pub fn difftime(time1: time_t, time0: time_t) -> ::c_double; + #[cfg_attr(target_os = "netbsd", link_name = "__timegm50")] + #[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t` + pub fn timegm(tm: *mut ::tm) -> time_t; #[cfg_attr(target_os = "netbsd", link_name = "__mknod50")] #[cfg_attr( @@ -1446,9 +1456,6 @@ extern "C" { #[cfg_attr(target_os = "netbsd", link_name = "__sigpending14")] pub fn sigpending(set: *mut sigset_t) -> ::c_int; - #[cfg_attr(target_os = "netbsd", link_name = "__timegm50")] - pub fn timegm(tm: *mut ::tm) -> time_t; - pub fn sysconf(name: ::c_int) -> ::c_long; pub fn mkfifo(path: *const c_char, mode: mode_t) -> ::c_int;