@@ -881,6 +881,7 @@ extern "C" {
881881 all( not( gnu_time_bits64) , gnu_file_offset_bits64) ,
882882 link_name = "fstat64"
883883 ) ]
884+ #[ cfg_attr( musl32_time64, link_name = "__fstat_time64" ) ]
884885 pub fn fstat ( fildes : c_int , buf : * mut stat ) -> c_int ;
885886
886887 pub fn mkdir ( path : * const c_char , mode : mode_t ) -> c_int ;
@@ -899,6 +900,7 @@ extern "C" {
899900 all( not( gnu_time_bits64) , gnu_file_offset_bits64) ,
900901 link_name = "stat64"
901902 ) ]
903+ #[ cfg_attr( musl32_time64, link_name = "__stat_time64" ) ]
902904 pub fn stat ( path : * const c_char , buf : * mut stat ) -> c_int ;
903905
904906 pub fn pclose ( stream : * mut crate :: FILE ) -> c_int ;
@@ -991,6 +993,7 @@ extern "C" {
991993 all( not( gnu_time_bits64) , gnu_file_offset_bits64) ,
992994 link_name = "fstatat64"
993995 ) ]
996+ #[ cfg_attr( musl32_time64, link_name = "__fstatat_time64" ) ]
994997 pub fn fstatat ( dirfd : c_int , pathname : * const c_char , buf : * mut stat , flags : c_int ) -> c_int ;
995998 pub fn linkat (
996999 olddirfd : c_int ,
@@ -1091,6 +1094,7 @@ extern "C" {
10911094 ) ]
10921095 #[ cfg_attr( target_os = "netbsd" , link_name = "__nanosleep50" ) ]
10931096 #[ cfg_attr( gnu_time_bits64, link_name = "__nanosleep64" ) ]
1097+ #[ cfg_attr( musl32_time64, link_name = "__nanosleep_time64" ) ]
10941098 pub fn nanosleep ( rqtp : * const timespec , rmtp : * mut timespec ) -> c_int ;
10951099 pub fn tcgetpgrp ( fd : c_int ) -> pid_t ;
10961100 pub fn tcsetpgrp ( fd : c_int , pgrp : crate :: pid_t ) -> c_int ;
@@ -1135,7 +1139,7 @@ extern "C" {
11351139 pub fn umask ( mask : mode_t ) -> mode_t ;
11361140
11371141 #[ cfg_attr( target_os = "netbsd" , link_name = "__utime50" ) ]
1138- #[ cfg_attr( gnu_time_bits64, link_name = "__utime64" ) ]
1142+ #[ cfg_attr( any ( gnu_time_bits64, musl32_time64 ) , link_name = "__utime64" ) ]
11391143 pub fn utime ( file : * const c_char , buf : * const utimbuf ) -> c_int ;
11401144
11411145 #[ cfg_attr(
@@ -1190,6 +1194,7 @@ extern "C" {
11901194 all( not( gnu_time_bits64) , gnu_file_offset_bits64) ,
11911195 link_name = "lstat64"
11921196 ) ]
1197+ #[ cfg_attr( musl32_time64, link_name = "__lstat_time64" ) ]
11931198 pub fn lstat ( path : * const c_char , buf : * mut stat ) -> c_int ;
11941199
11951200 #[ cfg_attr(
@@ -1221,6 +1226,7 @@ extern "C" {
12211226
12221227 #[ cfg_attr( target_os = "netbsd" , link_name = "__getrusage50" ) ]
12231228 #[ cfg_attr( gnu_time_bits64, link_name = "__getrusage64" ) ]
1229+ #[ cfg_attr( musl32_time64, link_name = "__getrusage_time64" ) ]
12241230 pub fn getrusage ( resource : c_int , usage : * mut rusage ) -> c_int ;
12251231
12261232 #[ cfg_attr(
@@ -1297,6 +1303,7 @@ extern "C" {
12971303 link_name = "pthread_cond_timedwait$UNIX2003"
12981304 ) ]
12991305 #[ cfg_attr( gnu_time_bits64, link_name = "__pthread_cond_timedwait64" ) ]
1306+ #[ cfg_attr( musl32_time64, link_name = "__pthread_cond_timedwait_time64" ) ]
13001307 pub fn pthread_cond_timedwait (
13011308 cond : * mut pthread_cond_t ,
13021309 lock : * mut pthread_mutex_t ,
@@ -1365,9 +1372,11 @@ extern "C" {
13651372
13661373 #[ cfg_attr( target_os = "netbsd" , link_name = "__utimes50" ) ]
13671374 #[ cfg_attr( gnu_time_bits64, link_name = "__utimes64" ) ]
1375+ #[ cfg_attr( musl32_time64, link_name = "__utimes_time64" ) ]
13681376 pub fn utimes ( filename : * const c_char , times : * const crate :: timeval ) -> c_int ;
13691377 pub fn dlopen ( filename : * const c_char , flag : c_int ) -> * mut c_void ;
13701378 pub fn dlerror ( ) -> * mut c_char ;
1379+ #[ cfg_attr( musl32_time64, link_name = "__dlsym_time64" ) ]
13711380 pub fn dlsym ( handle : * mut c_void , symbol : * const c_char ) -> * mut c_void ;
13721381 pub fn dlclose ( handle : * mut c_void ) -> c_int ;
13731382
@@ -1415,49 +1424,44 @@ extern "C" {
14151424 pub fn res_init ( ) -> c_int ;
14161425
14171426 #[ cfg_attr( target_os = "netbsd" , link_name = "__gmtime_r50" ) ]
1418- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1419- // FIXME(time): for `time_t`
14201427 #[ cfg_attr( gnu_time_bits64, link_name = "__gmtime64_r" ) ]
1428+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
1429+ #[ cfg_attr( musl32_time64, link_name = "__gmtime64_r" ) ]
14211430 pub fn gmtime_r ( time_p : * const time_t , result : * mut tm ) -> * mut tm ;
14221431 #[ cfg_attr( target_os = "netbsd" , link_name = "__localtime_r50" ) ]
1423- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1424- // FIXME(time): for `time_t`
14251432 #[ cfg_attr( gnu_time_bits64, link_name = "__localtime64_r" ) ]
1433+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
1434+ #[ cfg_attr( musl32_time64, link_name = "__localtime64_r" ) ]
14261435 pub fn localtime_r ( time_p : * const time_t , result : * mut tm ) -> * mut tm ;
14271436 #[ cfg_attr(
14281437 all( target_os = "macos" , target_arch = "x86" ) ,
14291438 link_name = "mktime$UNIX2003"
14301439 ) ]
14311440 #[ cfg_attr( target_os = "netbsd" , link_name = "__mktime50" ) ]
1432- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1433- // FIXME: for `time_t`
1434- #[ cfg_attr( gnu_time_bits64, link_name = "__mktime64" ) ]
1441+ #[ cfg_attr( any( gnu_time_bits64, musl32_time64) , link_name = "__mktime64" ) ]
1442+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
14351443 pub fn mktime ( tm : * mut tm ) -> time_t ;
14361444 #[ cfg_attr( target_os = "netbsd" , link_name = "__time50" ) ]
1437- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1438- // FIXME: for `time_t`
1439- #[ cfg_attr( gnu_time_bits64, link_name = "__time64" ) ]
1445+ #[ cfg_attr( any( gnu_time_bits64, musl32_time64) , link_name = "__time64" ) ]
1446+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
14401447 pub fn time ( time : * mut time_t ) -> time_t ;
14411448 #[ cfg_attr( target_os = "netbsd" , link_name = "__gmtime50" ) ]
1442- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1443- // FIXME(time): for `time_t`
1444- #[ cfg_attr( gnu_time_bits64, link_name = "__gmtime64" ) ]
1449+ #[ cfg_attr( any( gnu_time_bits64, musl32_time64) , link_name = "__gmtime64" ) ]
1450+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
14451451 pub fn gmtime ( time_p : * const time_t ) -> * mut tm ;
14461452 #[ cfg_attr( target_os = "netbsd" , link_name = "__locatime50" ) ]
1447- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1448- // FIXME(time): for `time_t`
1449- #[ cfg_attr( gnu_time_bits64, link_name = "__localtime64" ) ]
1453+ #[ cfg_attr( any( gnu_time_bits64, musl32_time64) , link_name = "__localtime64" ) ]
1454+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
14501455 pub fn localtime ( time_p : * const time_t ) -> * mut tm ;
14511456 #[ cfg_attr( target_os = "netbsd" , link_name = "__difftime50" ) ]
1452- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1453- // FIXME(time): for `time_t`
1454- #[ cfg_attr( gnu_time_bits64, link_name = "__difftime64" ) ]
1457+ #[ cfg_attr( any( gnu_time_bits64, musl32_time64) , link_name = "__difftime64" ) ]
1458+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
14551459 pub fn difftime ( time1 : time_t , time0 : time_t ) -> c_double ;
14561460 #[ cfg( not( target_os = "aix" ) ) ]
14571461 #[ cfg_attr( target_os = "netbsd" , link_name = "__timegm50" ) ]
1458- #[ cfg_attr( any( target_env = "musl" , target_env = "ohos" ) , allow( deprecated) ) ]
1459- // FIXME(time): for `time_t`
14601462 #[ cfg_attr( gnu_time_bits64, link_name = "__timegm64" ) ]
1463+ #[ cfg_attr( not( musl32_time64) , allow( deprecated) ) ]
1464+ #[ cfg_attr( musl32_time64, link_name = "__timegm_time64" ) ]
14611465 pub fn timegm ( tm : * mut crate :: tm ) -> time_t ;
14621466
14631467 #[ cfg_attr( target_os = "netbsd" , link_name = "__mknod50" ) ]
@@ -1517,6 +1521,7 @@ extern "C" {
15171521 #[ cfg_attr( target_os = "netbsd" , link_name = "__select50" ) ]
15181522 #[ cfg_attr( target_os = "aix" , link_name = "__fd_select" ) ]
15191523 #[ cfg_attr( gnu_time_bits64, link_name = "__select64" ) ]
1524+ #[ cfg_attr( musl32_time64, link_name = "__select_time64" ) ]
15201525 pub fn select (
15211526 nfds : c_int ,
15221527 readfds : * mut fd_set ,
@@ -1639,7 +1644,7 @@ cfg_if! {
16391644 target_os = "aix" ,
16401645 ) ) ) ] {
16411646 extern "C" {
1642- #[ cfg_attr( gnu_time_bits64, link_name = "__adjtime64" ) ]
1647+ #[ cfg_attr( any ( gnu_time_bits64, musl32_time64 ) , link_name = "__adjtime64" ) ]
16431648 pub fn adjtime( delta: * const timeval, olddelta: * mut timeval) -> c_int;
16441649 }
16451650 } else if #[ cfg( target_os = "solaris" ) ] {
@@ -1794,6 +1799,7 @@ cfg_if! {
17941799 ) ]
17951800 #[ cfg_attr( target_os = "netbsd" , link_name = "__pselect50" ) ]
17961801 #[ cfg_attr( gnu_time_bits64, link_name = "__pselect64" ) ]
1802+ #[ cfg_attr( musl32_time64, link_name = "__pselect_time64" ) ]
17971803 pub fn pselect(
17981804 nfds: c_int,
17991805 readfds: * mut fd_set,
0 commit comments