@@ -881,6 +881,7 @@ extern "C" {
881
881
all( not( gnu_time_bits64) , gnu_file_offset_bits64) ,
882
882
link_name = "fstat64"
883
883
) ]
884
+ #[ cfg_attr( musl_time64, link_name = "__fstat_time64" ) ]
884
885
pub fn fstat ( fildes : c_int , buf : * mut stat ) -> c_int ;
885
886
886
887
pub fn mkdir ( path : * const c_char , mode : mode_t ) -> c_int ;
@@ -899,6 +900,7 @@ extern "C" {
899
900
all( not( gnu_time_bits64) , gnu_file_offset_bits64) ,
900
901
link_name = "stat64"
901
902
) ]
903
+ #[ cfg_attr( musl_time64, link_name = "__stat_time64" ) ]
902
904
pub fn stat ( path : * const c_char , buf : * mut stat ) -> c_int ;
903
905
904
906
pub fn pclose ( stream : * mut crate :: FILE ) -> c_int ;
@@ -991,6 +993,7 @@ extern "C" {
991
993
all( not( gnu_time_bits64) , gnu_file_offset_bits64) ,
992
994
link_name = "fstatat64"
993
995
) ]
996
+ #[ cfg_attr( musl_time64, link_name = "__fstatat_time64" ) ]
994
997
pub fn fstatat ( dirfd : c_int , pathname : * const c_char , buf : * mut stat , flags : c_int ) -> c_int ;
995
998
pub fn linkat (
996
999
olddirfd : c_int ,
@@ -1091,6 +1094,7 @@ extern "C" {
1091
1094
) ]
1092
1095
#[ cfg_attr( target_os = "netbsd" , link_name = "__nanosleep50" ) ]
1093
1096
#[ cfg_attr( gnu_time_bits64, link_name = "__nanosleep64" ) ]
1097
+ #[ cfg_attr( musl_time64, link_name = "__nanosleep_time64" ) ]
1094
1098
pub fn nanosleep ( rqtp : * const timespec , rmtp : * mut timespec ) -> c_int ;
1095
1099
pub fn tcgetpgrp ( fd : c_int ) -> pid_t ;
1096
1100
pub fn tcsetpgrp ( fd : c_int , pgrp : crate :: pid_t ) -> c_int ;
@@ -1135,7 +1139,7 @@ extern "C" {
1135
1139
pub fn umask ( mask : mode_t ) -> mode_t ;
1136
1140
1137
1141
#[ cfg_attr( target_os = "netbsd" , link_name = "__utime50" ) ]
1138
- #[ cfg_attr( gnu_time_bits64, link_name = "__utime64" ) ]
1142
+ #[ cfg_attr( any ( gnu_time_bits64, musl_time64 ) , link_name = "__utime64" ) ]
1139
1143
pub fn utime ( file : * const c_char , buf : * const utimbuf ) -> c_int ;
1140
1144
1141
1145
#[ cfg_attr(
@@ -1190,6 +1194,7 @@ extern "C" {
1190
1194
all( not( gnu_time_bits64) , gnu_file_offset_bits64) ,
1191
1195
link_name = "lstat64"
1192
1196
) ]
1197
+ #[ cfg_attr( musl_time64, link_name = "__lstat_time64" ) ]
1193
1198
pub fn lstat ( path : * const c_char , buf : * mut stat ) -> c_int ;
1194
1199
1195
1200
#[ cfg_attr(
@@ -1221,6 +1226,7 @@ extern "C" {
1221
1226
1222
1227
#[ cfg_attr( target_os = "netbsd" , link_name = "__getrusage50" ) ]
1223
1228
#[ cfg_attr( gnu_time_bits64, link_name = "__getrusage64" ) ]
1229
+ #[ cfg_attr( musl_time64, link_name = "__getrusage_time64" ) ]
1224
1230
pub fn getrusage ( resource : c_int , usage : * mut rusage ) -> c_int ;
1225
1231
1226
1232
#[ cfg_attr(
@@ -1297,6 +1303,7 @@ extern "C" {
1297
1303
link_name = "pthread_cond_timedwait$UNIX2003"
1298
1304
) ]
1299
1305
#[ cfg_attr( gnu_time_bits64, link_name = "__pthread_cond_timedwait64" ) ]
1306
+ #[ cfg_attr( musl_time64, link_name = "__pthread_cond_timedwait_time64" ) ]
1300
1307
pub fn pthread_cond_timedwait (
1301
1308
cond : * mut pthread_cond_t ,
1302
1309
lock : * mut pthread_mutex_t ,
@@ -1365,9 +1372,11 @@ extern "C" {
1365
1372
1366
1373
#[ cfg_attr( target_os = "netbsd" , link_name = "__utimes50" ) ]
1367
1374
#[ cfg_attr( gnu_time_bits64, link_name = "__utimes64" ) ]
1375
+ #[ cfg_attr( musl_time64, link_name = "__utimes_time64" ) ]
1368
1376
pub fn utimes ( filename : * const c_char , times : * const crate :: timeval ) -> c_int ;
1369
1377
pub fn dlopen ( filename : * const c_char , flag : c_int ) -> * mut c_void ;
1370
1378
pub fn dlerror ( ) -> * mut c_char ;
1379
+ #[ cfg_attr( musl_time64, link_name = "__dlsym_time64" ) ]
1371
1380
pub fn dlsym ( handle : * mut c_void , symbol : * const c_char ) -> * mut c_void ;
1372
1381
pub fn dlclose ( handle : * mut c_void ) -> c_int ;
1373
1382
@@ -1415,49 +1424,44 @@ extern "C" {
1415
1424
pub fn res_init ( ) -> c_int ;
1416
1425
1417
1426
#[ 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`
1420
1427
#[ cfg_attr( gnu_time_bits64, link_name = "__gmtime64_r" ) ]
1428
+ #[ cfg_attr( musl_not_time64, allow( deprecated) ) ]
1429
+ #[ cfg_attr( musl_time64, link_name = "__gmtime64_r" ) ]
1421
1430
pub fn gmtime_r ( time_p : * const time_t , result : * mut tm ) -> * mut tm ;
1422
1431
#[ 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`
1425
1432
#[ cfg_attr( gnu_time_bits64, link_name = "__localtime64_r" ) ]
1433
+ #[ cfg_attr( musl_not_time64, allow( deprecated) ) ]
1434
+ #[ cfg_attr( musl_time64, link_name = "__localtime64_r" ) ]
1426
1435
pub fn localtime_r ( time_p : * const time_t , result : * mut tm ) -> * mut tm ;
1427
1436
#[ cfg_attr(
1428
1437
all( target_os = "macos" , target_arch = "x86" ) ,
1429
1438
link_name = "mktime$UNIX2003"
1430
1439
) ]
1431
1440
#[ 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, musl_time64) , link_name = "__mktime64" ) ]
1442
+ #[ cfg_attr( musl_not_time64, allow( deprecated) ) ]
1435
1443
pub fn mktime ( tm : * mut tm ) -> time_t ;
1436
1444
#[ 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, musl_time64) , link_name = "__time64" ) ]
1446
+ #[ cfg_attr( musl_not_time64, allow( deprecated) ) ]
1440
1447
pub fn time ( time : * mut time_t ) -> time_t ;
1441
1448
#[ 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, musl_time64) , link_name = "__gmtime64" ) ]
1450
+ #[ cfg_attr( musl_not_time64, allow( deprecated) ) ]
1445
1451
pub fn gmtime ( time_p : * const time_t ) -> * mut tm ;
1446
1452
#[ 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, musl_time64) , link_name = "__localtime64" ) ]
1454
+ #[ cfg_attr( musl_not_time64, allow( deprecated) ) ]
1450
1455
pub fn localtime ( time_p : * const time_t ) -> * mut tm ;
1451
1456
#[ 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, musl_time64) , link_name = "__difftime64" ) ]
1458
+ #[ cfg_attr( musl_not_time64, allow( deprecated) ) ]
1455
1459
pub fn difftime ( time1 : time_t , time0 : time_t ) -> c_double ;
1456
1460
#[ cfg( not( target_os = "aix" ) ) ]
1457
1461
#[ 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`
1460
1462
#[ cfg_attr( gnu_time_bits64, link_name = "__timegm64" ) ]
1463
+ #[ cfg_attr( musl_not_time64, allow( deprecated) ) ]
1464
+ #[ cfg_attr( musl_time64, link_name = "__timegm_time64" ) ]
1461
1465
pub fn timegm ( tm : * mut crate :: tm ) -> time_t ;
1462
1466
1463
1467
#[ cfg_attr( target_os = "netbsd" , link_name = "__mknod50" ) ]
@@ -1517,6 +1521,7 @@ extern "C" {
1517
1521
#[ cfg_attr( target_os = "netbsd" , link_name = "__select50" ) ]
1518
1522
#[ cfg_attr( target_os = "aix" , link_name = "__fd_select" ) ]
1519
1523
#[ cfg_attr( gnu_time_bits64, link_name = "__select64" ) ]
1524
+ #[ cfg_attr( musl_time64, link_name = "__select_time64" ) ]
1520
1525
pub fn select (
1521
1526
nfds : c_int ,
1522
1527
readfds : * mut fd_set ,
@@ -1639,7 +1644,7 @@ cfg_if! {
1639
1644
target_os = "aix" ,
1640
1645
) ) ) ] {
1641
1646
extern "C" {
1642
- #[ cfg_attr( gnu_time_bits64, link_name = "__adjtime64" ) ]
1647
+ #[ cfg_attr( any ( gnu_time_bits64, musl_time64 ) , link_name = "__adjtime64" ) ]
1643
1648
pub fn adjtime( delta: * const timeval, olddelta: * mut timeval) -> c_int;
1644
1649
}
1645
1650
} else if #[ cfg( target_os = "solaris" ) ] {
@@ -1794,6 +1799,7 @@ cfg_if! {
1794
1799
) ]
1795
1800
#[ cfg_attr( target_os = "netbsd" , link_name = "__pselect50" ) ]
1796
1801
#[ cfg_attr( gnu_time_bits64, link_name = "__pselect64" ) ]
1802
+ #[ cfg_attr( musl_time64, link_name = "__pselect_time64" ) ]
1797
1803
pub fn pselect(
1798
1804
nfds: c_int,
1799
1805
readfds: * mut fd_set,
0 commit comments