Skip to content

Commit 490b3d0

Browse files
committed
gnu: Use _TIME_BITS=64 versions of glibc symbols
Set the link names of relevant symbols to use be the same as when a C program is built against GNU libc with -D_TIME_BITS=64 -- which also requires -D_FILE_OFFSET_BITS=64. References: https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/io/fcntl.h fcntl on line 190 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/io/sys/poll.h ppoll on line 71 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/io/sys/stat.h difftime on line 86 fstat on line 218 fstat64 on line 249 fstatat on line 270 fstatat64 on line 296 futimens on line 456 gmtime on line 140 gmtime_r on line 163 localtime on line 141 localtime_r on line 167 lstat on line 318 lstat64 on line 318 mktime on line 88 stat on line 214 stat64 on line 214 time on line 85 timegm on line 249 utimensat on line 439 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/io/utime.h utime on line 56 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/misc/sys/ioctl.h ioctl on line 45 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/misc/sys/select.h pselect on line 134 select on line 108 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/posix/glob.h glob on line 154 glob64 on line 174 globfree on line 160 globfree64 on line 180 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/posix/sched.h sched_rr_get_interval on line 81 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/posix/sys/wait.h wait4 on line 163 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/resource/sys/resource.h getrusage on line 93 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/rt/aio.h aio_suspend on line 197 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/rt/mqueue.h mq_timedreceive on line 91 mq_timedsend on line 99 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/signal/signal.h sigtimedwait on line 279 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/socket/sys/socket.h getsockopt on line 260 recvmmsg on line 219 recvmsg on line 219 sendmmsg on line 199 sendmsg on line 178 setsockopt on line 281 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/nptl/pthread.h pthread_cond_timedwait on line 1151 pthread_mutex_timedlock on line 805 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/pthread/semaphore.h sem_timedwait on line 68 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/unix/sysv/linux/bits/time.h clock_adjtime on line 82 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/unix/sysv/linux/sys/epoll.h epoll_pwait2 on line 146 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/unix/sysv/linux/sys/prctl.h prctl on line 45 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/unix/sysv/linux/sys/timerfd.h timerfd_gettime on line 67 timerfd_settime on line 52 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysdeps/unix/sysv/linux/sys/timex.h adjtimex on line 70 ntp_adjtime on line 76 ntp_gettime on line 72 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysvipc/sys/msg.h msgctl on line 65 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysvipc/sys/sem.h semctl on line 55 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/sysvipc/sys/shm.h shmctl on line 53 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/time/sys/time.h adjtime on line 102 futimes on line 200 gettimeofday on line 71 lutimes on line 196 settimeofday on line 98 utimes on line 176 https://github.com/bminor/glibc/blob/e78caeb4ff812ae19d24d65f4d4d48508154277b/time/time.h clock_getres on line 299 clock_gettime on line 302 clock_nanosleep on line 328 clock_settime on line 305 ctime_r on line 206 nanosleep on line 328 timer_gettime on line 366 timer_settime on line 361
1 parent 946bfea commit 490b3d0

File tree

4 files changed

+98
-8
lines changed

4 files changed

+98
-8
lines changed

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,12 +1180,14 @@ extern "C" {
11801180
compar: Option<unsafe extern "C" fn(*const c_void, *const c_void, *mut c_void) -> c_int>,
11811181
arg: *mut c_void,
11821182
);
1183+
#[cfg_attr(gnu_time_bits64, link_name = "__sendmmsg64")]
11831184
pub fn sendmmsg(
11841185
sockfd: c_int,
11851186
msgvec: *mut crate::mmsghdr,
11861187
vlen: c_uint,
11871188
flags: c_int,
11881189
) -> c_int;
1190+
#[cfg_attr(gnu_time_bits64, link_name = "__recvmmsg64")]
11891191
pub fn recvmmsg(
11901192
sockfd: c_int,
11911193
msgvec: *mut crate::mmsghdr,
@@ -1224,15 +1226,20 @@ extern "C" {
12241226
pub fn endutxent();
12251227
pub fn getpt() -> c_int;
12261228
pub fn mallopt(param: c_int, value: c_int) -> c_int;
1229+
#[cfg_attr(gnu_time_bits64, link_name = "__gettimeofday64")]
12271230
pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int;
12281231
pub fn getentropy(buf: *mut c_void, buflen: size_t) -> c_int;
12291232
pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t;
12301233
pub fn getauxval(type_: c_ulong) -> c_ulong;
12311234

1235+
#[cfg_attr(gnu_time_bits64, link_name = "___adjtimex64")]
12321236
pub fn adjtimex(buf: *mut timex) -> c_int;
1237+
#[cfg_attr(gnu_time_bits64, link_name = "___adjtimex64")]
12331238
pub fn ntp_adjtime(buf: *mut timex) -> c_int;
1234-
#[link_name = "ntp_gettimex"]
1239+
#[cfg_attr(not(gnu_time_bits64), link_name = "ntp_gettimex")]
1240+
#[cfg_attr(gnu_time_bits64, link_name = "__ntp_gettime64")]
12351241
pub fn ntp_gettime(buf: *mut ntptimeval) -> c_int;
1242+
#[cfg_attr(gnu_time_bits64, link_name = "__clock_adjtime64")]
12361243
pub fn clock_adjtime(clk_id: crate::clockid_t, buf: *mut crate::timex) -> c_int;
12371244

12381245
pub fn fanotify_mark(
@@ -1287,12 +1294,14 @@ extern "C" {
12871294

12881295
pub fn ctermid(s: *mut c_char) -> *mut c_char;
12891296
pub fn backtrace(buf: *mut *mut c_void, sz: c_int) -> c_int;
1297+
#[cfg_attr(gnu_time_bits64, link_name = "__glob64_time64")]
12901298
pub fn glob64(
12911299
pattern: *const c_char,
12921300
flags: c_int,
12931301
errfunc: Option<extern "C" fn(epath: *const c_char, errno: c_int) -> c_int>,
12941302
pglob: *mut glob64_t,
12951303
) -> c_int;
1304+
#[cfg_attr(gnu_time_bits64, link_name = "__globfree64_time64")]
12961305
pub fn globfree64(pglob: *mut glob64_t);
12971306
pub fn ptrace(request: c_uint, ...) -> c_long;
12981307
pub fn pthread_attr_getaffinity_np(
@@ -1360,6 +1369,7 @@ extern "C" {
13601369
pub fn eaccess(pathname: *const c_char, mode: c_int) -> c_int;
13611370

13621371
pub fn asctime_r(tm: *const crate::tm, buf: *mut c_char) -> *mut c_char;
1372+
#[cfg_attr(gnu_time_bits64, link_name = "__ctime64_r")]
13631373
pub fn ctime_r(timep: *const time_t, buf: *mut c_char) -> *mut c_char;
13641374

13651375
pub fn dirname(path: *mut c_char) -> *mut c_char;
@@ -1424,6 +1434,7 @@ extern "C" {
14241434

14251435
pub fn mq_notify(mqdes: crate::mqd_t, sevp: *const crate::sigevent) -> c_int;
14261436

1437+
#[cfg_attr(gnu_time_bits64, link_name = "__epoll_pwait2_time64")]
14271438
pub fn epoll_pwait2(
14281439
epfd: c_int,
14291440
events: *mut crate::epoll_event,

src/unix/linux_like/linux/mod.rs

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6231,6 +6231,7 @@ cfg_if! {
62316231
pub fn aio_error(aiocbp: *const aiocb) -> c_int;
62326232
#[cfg_attr(gnu_file_offset_bits64, link_name = "aio_return64")]
62336233
pub fn aio_return(aiocbp: *mut aiocb) -> ssize_t;
6234+
#[cfg_attr(gnu_time_bits64, link_name = "__aio_suspend_time64")]
62346235
pub fn aio_suspend(
62356236
aiocb_list: *const *const aiocb,
62366237
nitems: c_int,
@@ -6292,6 +6293,7 @@ cfg_if! {
62926293
riovcnt: c_ulong,
62936294
flags: c_ulong,
62946295
) -> isize;
6296+
#[cfg_attr(gnu_time_bits64, link_name = "__futimes64")]
62956297
pub fn futimes(fd: c_int, times: *const crate::timeval) -> c_int;
62966298
}
62976299
}
@@ -6321,6 +6323,7 @@ cfg_if! {
63216323
msg_len: size_t,
63226324
msg_prio: *mut c_uint,
63236325
) -> ssize_t;
6326+
#[cfg_attr(gnu_time_bits64, link_name = "__mq_timedreceive_time64")]
63246327
pub fn mq_timedreceive(
63256328
mqd: crate::mqd_t,
63266329
msg_ptr: *mut c_char,
@@ -6334,6 +6337,7 @@ cfg_if! {
63346337
msg_len: size_t,
63356338
msg_prio: c_uint,
63366339
) -> c_int;
6340+
#[cfg_attr(gnu_time_bits64, link_name = "__mq_timedsend_time64")]
63376341
pub fn mq_timedsend(
63386342
mqd: crate::mqd_t,
63396343
msg_ptr: *const c_char,
@@ -6384,6 +6388,7 @@ extern "C" {
63846388
pub fn seed48(xseed: *mut c_ushort) -> *mut c_ushort;
63856389
pub fn lcong48(p: *mut c_ushort);
63866390

6391+
#[cfg_attr(gnu_time_bits64, link_name = "__lutimes64")]
63876392
pub fn lutimes(file: *const c_char, times: *const crate::timeval) -> c_int;
63886393

63896394
pub fn setpwent();
@@ -6405,11 +6410,14 @@ extern "C" {
64056410
pub fn shmget(key: crate::key_t, size: size_t, shmflg: c_int) -> c_int;
64066411
pub fn shmat(shmid: c_int, shmaddr: *const c_void, shmflg: c_int) -> *mut c_void;
64076412
pub fn shmdt(shmaddr: *const c_void) -> c_int;
6413+
#[cfg_attr(gnu_time_bits64, link_name = "__shmctl64")]
64086414
pub fn shmctl(shmid: c_int, cmd: c_int, buf: *mut crate::shmid_ds) -> c_int;
64096415
pub fn ftok(pathname: *const c_char, proj_id: c_int) -> crate::key_t;
64106416
pub fn semget(key: crate::key_t, nsems: c_int, semflag: c_int) -> c_int;
64116417
pub fn semop(semid: c_int, sops: *mut crate::sembuf, nsops: size_t) -> c_int;
6418+
#[cfg_attr(gnu_time_bits64, link_name = "__semctl64")]
64126419
pub fn semctl(semid: c_int, semnum: c_int, cmd: c_int, ...) -> c_int;
6420+
#[cfg_attr(gnu_time_bits64, link_name = "__msgctl64")]
64136421
pub fn msgctl(msqid: c_int, cmd: c_int, buf: *mut msqid_ds) -> c_int;
64146422
pub fn msgget(key: crate::key_t, msgflg: c_int) -> c_int;
64156423
pub fn msgrcv(
@@ -6476,7 +6484,9 @@ extern "C" {
64766484
pub fn fremovexattr(filedes: c_int, name: *const c_char) -> c_int;
64776485
pub fn signalfd(fd: c_int, mask: *const crate::sigset_t, flags: c_int) -> c_int;
64786486
pub fn timerfd_create(clockid: crate::clockid_t, flags: c_int) -> c_int;
6487+
#[cfg_attr(gnu_time_bits64, link_name = "__timerfd_gettime64")]
64796488
pub fn timerfd_gettime(fd: c_int, curr_value: *mut itimerspec) -> c_int;
6489+
#[cfg_attr(gnu_time_bits64, link_name = "__timerfd_settime64")]
64806490
pub fn timerfd_settime(
64816491
fd: c_int,
64826492
flags: c_int,
@@ -6492,6 +6502,7 @@ extern "C" {
64926502
sigmask: *const crate::sigset_t,
64936503
) -> c_int;
64946504
pub fn dup3(oldfd: c_int, newfd: c_int, flags: c_int) -> c_int;
6505+
#[cfg_attr(gnu_time_bits64, link_name = "__sigtimedwait64")]
64956506
pub fn sigtimedwait(
64966507
set: *const sigset_t,
64976508
info: *mut siginfo_t,
@@ -6533,14 +6544,22 @@ extern "C" {
65336544
...
65346545
) -> *mut c_void;
65356546

6536-
#[cfg_attr(gnu_file_offset_bits64, link_name = "glob64")]
6547+
#[cfg_attr(gnu_time_bits64, link_name = "__glob64_time64")]
6548+
#[cfg_attr(
6549+
all(not(gnu_time_bits64), gnu_file_offset_bits64),
6550+
link_name = "glob64"
6551+
)]
65376552
pub fn glob(
65386553
pattern: *const c_char,
65396554
flags: c_int,
65406555
errfunc: Option<extern "C" fn(epath: *const c_char, errno: c_int) -> c_int>,
65416556
pglob: *mut crate::glob_t,
65426557
) -> c_int;
6543-
#[cfg_attr(gnu_file_offset_bits64, link_name = "globfree64")]
6558+
#[cfg_attr(gnu_time_bits64, link_name = "__globfree64_time64")]
6559+
#[cfg_attr(
6560+
all(not(gnu_time_bits64), gnu_file_offset_bits64),
6561+
link_name = "globfree64"
6562+
)]
65446563
pub fn globfree(pglob: *mut crate::glob_t);
65456564

65466565
pub fn posix_madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int;
@@ -6603,6 +6622,7 @@ extern "C" {
66036622
pub fn umount(target: *const c_char) -> c_int;
66046623
pub fn sched_get_priority_max(policy: c_int) -> c_int;
66056624
pub fn tee(fd_in: c_int, fd_out: c_int, len: size_t, flags: c_uint) -> ssize_t;
6625+
#[cfg_attr(gnu_time_bits64, link_name = "__settimeofday64")]
66066626
pub fn settimeofday(tv: *const crate::timeval, tz: *const crate::timezone) -> c_int;
66076627
pub fn splice(
66086628
fd_in: c_int,
@@ -6616,7 +6636,9 @@ extern "C" {
66166636
pub fn eventfd_read(fd: c_int, value: *mut eventfd_t) -> c_int;
66176637
pub fn eventfd_write(fd: c_int, value: eventfd_t) -> c_int;
66186638

6639+
#[cfg_attr(gnu_time_bits64, link_name = "__sched_rr_get_interval64")]
66196640
pub fn sched_rr_get_interval(pid: crate::pid_t, tp: *mut crate::timespec) -> c_int;
6641+
#[cfg_attr(gnu_time_bits64, link_name = "__sem_timedwait64")]
66206642
pub fn sem_timedwait(sem: *mut sem_t, abstime: *const crate::timespec) -> c_int;
66216643
pub fn sem_getvalue(sem: *mut sem_t, sval: *mut c_int) -> c_int;
66226644
pub fn sched_setparam(pid: crate::pid_t, param: *const crate::sched_param) -> c_int;
@@ -6632,8 +6654,10 @@ extern "C" {
66326654
data: *const c_void,
66336655
) -> c_int;
66346656
pub fn personality(persona: c_ulong) -> c_int;
6657+
#[cfg_attr(gnu_time_bits64, link_name = "__prctl_time64")]
66356658
pub fn prctl(option: c_int, ...) -> c_int;
66366659
pub fn sched_getparam(pid: crate::pid_t, param: *mut crate::sched_param) -> c_int;
6660+
#[cfg_attr(gnu_time_bits64, link_name = "__ppoll64")]
66376661
pub fn ppoll(
66386662
fds: *mut crate::pollfd,
66396663
nfds: nfds_t,
@@ -6646,6 +6670,7 @@ extern "C" {
66466670
) -> c_int;
66476671
pub fn pthread_mutexattr_setprotocol(attr: *mut pthread_mutexattr_t, protocol: c_int) -> c_int;
66486672

6673+
#[cfg_attr(gnu_time_bits64, link_name = "__pthread_mutex_timedlock64")]
66496674
pub fn pthread_mutex_timedlock(
66506675
lock: *mut pthread_mutex_t,
66516676
abstime: *const crate::timespec,
@@ -6680,6 +6705,7 @@ extern "C" {
66806705
...
66816706
) -> c_int;
66826707
pub fn sched_getscheduler(pid: crate::pid_t) -> c_int;
6708+
#[cfg_attr(gnu_time_bits64, link_name = "__clock_nanosleep_time64")]
66836709
pub fn clock_nanosleep(
66846710
clk_id: crate::clockid_t,
66856711
flags: c_int,
@@ -6937,7 +6963,9 @@ extern "C" {
69376963
) -> c_int;
69386964
pub fn timer_delete(timerid: crate::timer_t) -> c_int;
69396965
pub fn timer_getoverrun(timerid: crate::timer_t) -> c_int;
6966+
#[cfg_attr(gnu_time_bits64, link_name = "__timer_gettime64")]
69406967
pub fn timer_gettime(timerid: crate::timer_t, curr_value: *mut crate::itimerspec) -> c_int;
6968+
#[cfg_attr(gnu_time_bits64, link_name = "__timer_settime64")]
69416969
pub fn timer_settime(
69426970
timerid: crate::timer_t,
69436971
flags: c_int,

src/unix/linux_like/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,6 +1825,7 @@ cfg_if! {
18251825
}
18261826

18271827
extern "C" {
1828+
#[cfg_attr(gnu_time_bits64, link_name = "__ioctl_time64")]
18281829
pub fn ioctl(fd: c_int, request: Ioctl, ...) -> c_int;
18291830
}
18301831
}
@@ -1970,8 +1971,11 @@ extern "C" {
19701971
pub fn fdatasync(fd: c_int) -> c_int;
19711972
pub fn mincore(addr: *mut c_void, len: size_t, vec: *mut c_uchar) -> c_int;
19721973

1974+
#[cfg_attr(gnu_time_bits64, link_name = "__clock_getres64")]
19731975
pub fn clock_getres(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int;
1976+
#[cfg_attr(gnu_time_bits64, link_name = "__clock_gettime64")]
19741977
pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int;
1978+
#[cfg_attr(gnu_time_bits64, link_name = "__clock_settime64")]
19751979
pub fn clock_settime(clk_id: crate::clockid_t, tp: *const crate::timespec) -> c_int;
19761980
pub fn clock_getcpuclockid(pid: crate::pid_t, clk_id: *mut crate::clockid_t) -> c_int;
19771981

@@ -1998,7 +2002,9 @@ extern "C" {
19982002
pub fn memrchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void;
19992003
#[cfg_attr(gnu_file_offset_bits64, link_name = "posix_fadvise64")]
20002004
pub fn posix_fadvise(fd: c_int, offset: off_t, len: off_t, advise: c_int) -> c_int;
2005+
#[cfg_attr(gnu_time_bits64, link_name = "__futimens64")]
20012006
pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int;
2007+
#[cfg_attr(gnu_time_bits64, link_name = "__utimensat64")]
20022008
pub fn utimensat(
20032009
dirfd: c_int,
20042010
path: *const c_char,
@@ -2048,6 +2054,7 @@ extern "C" {
20482054
pub fn sbrk(increment: intptr_t) -> *mut c_void;
20492055
pub fn setresgid(rgid: crate::gid_t, egid: crate::gid_t, sgid: crate::gid_t) -> c_int;
20502056
pub fn setresuid(ruid: crate::uid_t, euid: crate::uid_t, suid: crate::uid_t) -> c_int;
2057+
#[cfg_attr(gnu_time_bits64, link_name = "__wait4_time64")]
20512058
pub fn wait4(
20522059
pid: crate::pid_t,
20532060
status: *mut c_int,
@@ -2072,7 +2079,9 @@ extern "C" {
20722079
pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t;
20732080
pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t;
20742081

2082+
#[cfg_attr(gnu_time_bits64, link_name = "__sendmsg64")]
20752083
pub fn sendmsg(fd: c_int, msg: *const crate::msghdr, flags: c_int) -> ssize_t;
2084+
#[cfg_attr(gnu_time_bits64, link_name = "__recvmsg64")]
20762085
pub fn recvmsg(fd: c_int, msg: *mut crate::msghdr, flags: c_int) -> ssize_t;
20772086
pub fn uname(buf: *mut crate::utsname) -> c_int;
20782087

@@ -2114,7 +2123,9 @@ cfg_if! {
21142123
pub fn fstatvfs64(fd: c_int, buf: *mut statvfs64) -> c_int;
21152124
pub fn statfs64(path: *const c_char, buf: *mut statfs64) -> c_int;
21162125
pub fn creat64(path: *const c_char, mode: mode_t) -> c_int;
2126+
#[cfg_attr(gnu_time_bits64, link_name = "__fstat64_time64")]
21172127
pub fn fstat64(fildes: c_int, buf: *mut stat64) -> c_int;
2128+
#[cfg_attr(gnu_time_bits64, link_name = "__fstatat64_time64")]
21182129
pub fn fstatat64(
21192130
dirfd: c_int,
21202131
pathname: *const c_char,
@@ -2123,6 +2134,7 @@ cfg_if! {
21232134
) -> c_int;
21242135
pub fn ftruncate64(fd: c_int, length: off64_t) -> c_int;
21252136
pub fn lseek64(fd: c_int, offset: off64_t, whence: c_int) -> off64_t;
2137+
#[cfg_attr(gnu_time_bits64, link_name = "__lstat64_time64")]
21262138
pub fn lstat64(path: *const c_char, buf: *mut stat64) -> c_int;
21272139
pub fn mmap64(
21282140
addr: *mut c_void,
@@ -2153,6 +2165,7 @@ cfg_if! {
21532165
entry: *mut crate::dirent64,
21542166
result: *mut *mut crate::dirent64,
21552167
) -> c_int;
2168+
#[cfg_attr(gnu_time_bits64, link_name = "__stat64_time64")]
21562169
pub fn stat64(path: *const c_char, buf: *mut stat64) -> c_int;
21572170
pub fn truncate64(path: *const c_char, length: off64_t) -> c_int;
21582171
}

0 commit comments

Comments
 (0)