@@ -905,6 +905,7 @@ extern "C" {
905905 all( not( gnu_time_bits64) , gnu_file_offset_bits64) ,
906906 link_name = "fstat64"
907907 ) ]
908+ #[ cfg_attr( musl32_time64, link_name = "__fstat_time64" ) ]
908909 pub fn fstat ( fildes : c_int , buf : * mut stat ) -> c_int ;
909910
910911 pub fn mkdir ( path : * const c_char , mode : mode_t ) -> c_int ;
@@ -923,6 +924,7 @@ extern "C" {
923924 all( not( gnu_time_bits64) , gnu_file_offset_bits64) ,
924925 link_name = "stat64"
925926 ) ]
927+ #[ cfg_attr( musl32_time64, link_name = "__stat_time64" ) ]
926928 pub fn stat ( path : * const c_char , buf : * mut stat ) -> c_int ;
927929
928930 pub fn pclose ( stream : * mut crate :: FILE ) -> c_int ;
@@ -1015,6 +1017,7 @@ extern "C" {
10151017 all( not( gnu_time_bits64) , gnu_file_offset_bits64) ,
10161018 link_name = "fstatat64"
10171019 ) ]
1020+ #[ cfg_attr( musl32_time64, link_name = "__fstatat_time64" ) ]
10181021 pub fn fstatat ( dirfd : c_int , pathname : * const c_char , buf : * mut stat , flags : c_int ) -> c_int ;
10191022 pub fn linkat (
10201023 olddirfd : c_int ,
@@ -1115,6 +1118,7 @@ extern "C" {
11151118 ) ]
11161119 #[ cfg_attr( target_os = "netbsd" , link_name = "__nanosleep50" ) ]
11171120 #[ cfg_attr( gnu_time_bits64, link_name = "__nanosleep64" ) ]
1121+ #[ cfg_attr( musl32_time64, link_name = "__nanosleep_time64" ) ]
11181122 pub fn nanosleep ( rqtp : * const timespec , rmtp : * mut timespec ) -> c_int ;
11191123 pub fn tcgetpgrp ( fd : c_int ) -> pid_t ;
11201124 pub fn tcsetpgrp ( fd : c_int , pgrp : crate :: pid_t ) -> c_int ;
@@ -1159,7 +1163,7 @@ extern "C" {
11591163 pub fn umask ( mask : mode_t ) -> mode_t ;
11601164
11611165 #[ cfg_attr( target_os = "netbsd" , link_name = "__utime50" ) ]
1162- #[ cfg_attr( gnu_time_bits64, link_name = "__utime64" ) ]
1166+ #[ cfg_attr( any ( gnu_time_bits64, musl32_time64 ) , link_name = "__utime64" ) ]
11631167 pub fn utime ( file : * const c_char , buf : * const utimbuf ) -> c_int ;
11641168
11651169 #[ cfg_attr(
@@ -1214,6 +1218,7 @@ extern "C" {
12141218 all( not( gnu_time_bits64) , gnu_file_offset_bits64) ,
12151219 link_name = "lstat64"
12161220 ) ]
1221+ #[ cfg_attr( musl32_time64, link_name = "__lstat_time64" ) ]
12171222 pub fn lstat ( path : * const c_char , buf : * mut stat ) -> c_int ;
12181223
12191224 #[ cfg_attr(
@@ -1245,6 +1250,7 @@ extern "C" {
12451250
12461251 #[ cfg_attr( target_os = "netbsd" , link_name = "__getrusage50" ) ]
12471252 #[ cfg_attr( gnu_time_bits64, link_name = "__getrusage64" ) ]
1253+ #[ cfg_attr( musl32_time64, link_name = "__getrusage_time64" ) ]
12481254 pub fn getrusage ( resource : c_int , usage : * mut rusage ) -> c_int ;
12491255
12501256 #[ cfg_attr(
@@ -1327,6 +1333,7 @@ extern "C" {
13271333 link_name = "pthread_cond_timedwait$UNIX2003"
13281334 ) ]
13291335 #[ cfg_attr( gnu_time_bits64, link_name = "__pthread_cond_timedwait64" ) ]
1336+ #[ cfg_attr( musl32_time64, link_name = "__pthread_cond_timedwait_time64" ) ]
13301337 pub fn pthread_cond_timedwait (
13311338 cond : * mut crate :: pthread_cond_t ,
13321339 lock : * mut crate :: pthread_mutex_t ,
@@ -1395,9 +1402,11 @@ extern "C" {
13951402
13961403 #[ cfg_attr( target_os = "netbsd" , link_name = "__utimes50" ) ]
13971404 #[ cfg_attr( gnu_time_bits64, link_name = "__utimes64" ) ]
1405+ #[ cfg_attr( musl32_time64, link_name = "__utimes_time64" ) ]
13981406 pub fn utimes ( filename : * const c_char , times : * const crate :: timeval ) -> c_int ;
13991407 pub fn dlopen ( filename : * const c_char , flag : c_int ) -> * mut c_void ;
14001408 pub fn dlerror ( ) -> * mut c_char ;
1409+ #[ cfg_attr( musl32_time64, link_name = "__dlsym_time64" ) ]
14011410 pub fn dlsym ( handle : * mut c_void , symbol : * const c_char ) -> * mut c_void ;
14021411 pub fn dlclose ( handle : * mut c_void ) -> c_int ;
14031412
@@ -1445,49 +1454,44 @@ extern "C" {
14451454 pub fn res_init ( ) -> c_int ;
14461455
14471456 #[ cfg_attr( target_os = "netbsd" , link_name = "__gmtime_r50" ) ]
1448- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1449- // FIXME(time): for `time_t`
14501457 #[ cfg_attr( gnu_time_bits64, link_name = "__gmtime64_r" ) ]
1458+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
1459+ #[ cfg_attr( musl32_time64, link_name = "__gmtime64_r" ) ]
14511460 pub fn gmtime_r ( time_p : * const time_t , result : * mut tm ) -> * mut tm ;
14521461 #[ cfg_attr( target_os = "netbsd" , link_name = "__localtime_r50" ) ]
1453- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1454- // FIXME(time): for `time_t`
14551462 #[ cfg_attr( gnu_time_bits64, link_name = "__localtime64_r" ) ]
1463+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
1464+ #[ cfg_attr( musl32_time64, link_name = "__localtime64_r" ) ]
14561465 pub fn localtime_r ( time_p : * const time_t , result : * mut tm ) -> * mut tm ;
14571466 #[ cfg_attr(
14581467 all( target_os = "macos" , target_arch = "x86" ) ,
14591468 link_name = "mktime$UNIX2003"
14601469 ) ]
14611470 #[ cfg_attr( target_os = "netbsd" , link_name = "__mktime50" ) ]
1462- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1463- // FIXME: for `time_t`
1464- #[ cfg_attr( gnu_time_bits64, link_name = "__mktime64" ) ]
1471+ #[ cfg_attr( any( gnu_time_bits64, musl32_time64) , link_name = "__mktime64" ) ]
1472+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
14651473 pub fn mktime ( tm : * mut tm ) -> time_t ;
14661474 #[ cfg_attr( target_os = "netbsd" , link_name = "__time50" ) ]
1467- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1468- // FIXME: for `time_t`
1469- #[ cfg_attr( gnu_time_bits64, link_name = "__time64" ) ]
1475+ #[ cfg_attr( any( gnu_time_bits64, musl32_time64) , link_name = "__time64" ) ]
1476+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
14701477 pub fn time ( time : * mut time_t ) -> time_t ;
14711478 #[ cfg_attr( target_os = "netbsd" , link_name = "__gmtime50" ) ]
1472- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1473- // FIXME(time): for `time_t`
1474- #[ cfg_attr( gnu_time_bits64, link_name = "__gmtime64" ) ]
1479+ #[ cfg_attr( any( gnu_time_bits64, musl32_time64) , link_name = "__gmtime64" ) ]
1480+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
14751481 pub fn gmtime ( time_p : * const time_t ) -> * mut tm ;
14761482 #[ cfg_attr( target_os = "netbsd" , link_name = "__locatime50" ) ]
1477- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1478- // FIXME(time): for `time_t`
1479- #[ cfg_attr( gnu_time_bits64, link_name = "__localtime64" ) ]
1483+ #[ cfg_attr( any( gnu_time_bits64, musl32_time64) , link_name = "__localtime64" ) ]
1484+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
14801485 pub fn localtime ( time_p : * const time_t ) -> * mut tm ;
14811486 #[ cfg_attr( target_os = "netbsd" , link_name = "__difftime50" ) ]
1482- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1483- // FIXME(time): for `time_t`
1484- #[ cfg_attr( gnu_time_bits64, link_name = "__difftime64" ) ]
1487+ #[ cfg_attr( any( gnu_time_bits64, musl32_time64) , link_name = "__difftime64" ) ]
1488+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
14851489 pub fn difftime ( time1 : time_t , time0 : time_t ) -> c_double ;
14861490 #[ cfg( not( target_os = "aix" ) ) ]
14871491 #[ cfg_attr( target_os = "netbsd" , link_name = "__timegm50" ) ]
1488- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1489- // FIXME(time): for `time_t`
14901492 #[ cfg_attr( gnu_time_bits64, link_name = "__timegm64" ) ]
1493+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
1494+ #[ cfg_attr( musl32_time64, link_name = "__timegm_time64" ) ]
14911495 pub fn timegm ( tm : * mut crate :: tm ) -> time_t ;
14921496
14931497 #[ cfg_attr( target_os = "netbsd" , link_name = "__mknod50" ) ]
@@ -1548,6 +1552,7 @@ extern "C" {
15481552 #[ cfg_attr( target_os = "netbsd" , link_name = "__select50" ) ]
15491553 #[ cfg_attr( target_os = "aix" , link_name = "__fd_select" ) ]
15501554 #[ cfg_attr( gnu_time_bits64, link_name = "__select64" ) ]
1555+ #[ cfg_attr( musl32_time64, link_name = "__select_time64" ) ]
15511556 pub fn select (
15521557 nfds : c_int ,
15531558 readfds : * mut fd_set ,
@@ -1671,7 +1676,7 @@ cfg_if! {
16711676 ) ) ) ] {
16721677 extern "C" {
16731678 #[ cfg_attr( target_os = "netbsd" , link_name = "__adjtime50" ) ]
1674- #[ cfg_attr( gnu_time_bits64, link_name = "__adjtime64" ) ]
1679+ #[ cfg_attr( any ( gnu_time_bits64, musl32_time64 ) , link_name = "__adjtime64" ) ]
16751680 pub fn adjtime( delta: * const timeval, olddelta: * mut timeval) -> c_int;
16761681 }
16771682 } else if #[ cfg( target_os = "solaris" ) ] {
@@ -1844,6 +1849,7 @@ cfg_if! {
18441849 ) ]
18451850 #[ cfg_attr( target_os = "netbsd" , link_name = "__pselect50" ) ]
18461851 #[ cfg_attr( gnu_time_bits64, link_name = "__pselect64" ) ]
1852+ #[ cfg_attr( musl32_time64, link_name = "__pselect_time64" ) ]
18471853 pub fn pselect(
18481854 nfds: c_int,
18491855 readfds: * mut fd_set,
0 commit comments