Skip to content

Commit a208f4b

Browse files
committed
gnu: Use _TIME_BITS and _FILE_OFFSET_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 and -D_FILE_OFFSET_BITS=64.
1 parent e20b517 commit a208f4b

File tree

4 files changed

+113
-1
lines changed

4 files changed

+113
-1
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1286,12 +1286,14 @@ extern "C" {
12861286
>,
12871287
arg: *mut ::c_void,
12881288
);
1289+
#[cfg_attr(gnu_time64_abi, link_name = "__sendmmsg64")]
12891290
pub fn sendmmsg(
12901291
sockfd: ::c_int,
12911292
msgvec: *mut ::mmsghdr,
12921293
vlen: ::c_uint,
12931294
flags: ::c_int,
12941295
) -> ::c_int;
1296+
#[cfg_attr(gnu_time64_abi, link_name = "__recvmmsg64")]
12951297
pub fn recvmmsg(
12961298
sockfd: ::c_int,
12971299
msgvec: *mut ::mmsghdr,
@@ -1302,8 +1304,11 @@ extern "C" {
13021304

13031305
pub fn getrlimit64(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit64) -> ::c_int;
13041306
pub fn setrlimit64(resource: ::__rlimit_resource_t, rlim: *const ::rlimit64) -> ::c_int;
1307+
#[cfg_attr(gnu_time64_abi, link_name = "getrlimit64")]
13051308
pub fn getrlimit(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit) -> ::c_int;
1309+
#[cfg_attr(gnu_time64_abi, link_name = "setrlimit64")]
13061310
pub fn setrlimit(resource: ::__rlimit_resource_t, rlim: *const ::rlimit) -> ::c_int;
1311+
#[cfg_attr(gnu_time64_abi, link_name = "prlimit64")]
13071312
pub fn prlimit(
13081313
pid: ::pid_t,
13091314
resource: ::__rlimit_resource_t,
@@ -1326,6 +1331,7 @@ extern "C" {
13261331
pub fn endutxent();
13271332
pub fn getpt() -> ::c_int;
13281333
pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int;
1334+
#[cfg_attr(gnu_time64_abi, link_name = "__gettimeofday64")]
13291335
pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int;
13301336
pub fn statx(
13311337
dirfd: ::c_int,
@@ -1338,10 +1344,14 @@ extern "C" {
13381344
pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;
13391345
pub fn getauxval(type_: ::c_ulong) -> ::c_ulong;
13401346

1347+
#[cfg_attr(gnu_time64_abi, link_name = "___adjtimex64")]
13411348
pub fn adjtimex(buf: *mut timex) -> ::c_int;
1349+
#[cfg_attr(gnu_time64_abi, link_name = "___adjtimex64")]
13421350
pub fn ntp_adjtime(buf: *mut timex) -> ::c_int;
1343-
#[link_name = "ntp_gettimex"]
1351+
#[cfg_attr(not(gnu_time64_abi), link_name = "ntp_gettimex")]
1352+
#[cfg_attr(gnu_time64_abi, link_name = "__ntp_gettime64")]
13441353
pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int;
1354+
#[cfg_attr(gnu_time64_abi, link_name = "__clock_adjtime64")]
13451355
pub fn clock_adjtime(clk_id: ::clockid_t, buf: *mut ::timex) -> ::c_int;
13461356

13471357
pub fn fanotify_mark(
@@ -1351,13 +1361,15 @@ extern "C" {
13511361
dirfd: ::c_int,
13521362
path: *const ::c_char,
13531363
) -> ::c_int;
1364+
#[cfg_attr(gnu_time64_abi, link_name = "preadv64v2")]
13541365
pub fn preadv2(
13551366
fd: ::c_int,
13561367
iov: *const ::iovec,
13571368
iovcnt: ::c_int,
13581369
offset: ::off_t,
13591370
flags: ::c_int,
13601371
) -> ::ssize_t;
1372+
#[cfg_attr(gnu_time64_abi, link_name = "pwritev64v2")]
13611373
pub fn pwritev2(
13621374
fd: ::c_int,
13631375
iov: *const ::iovec,
@@ -1393,14 +1405,17 @@ extern "C" {
13931405
pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void;
13941406

13951407
pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char;
1408+
#[cfg_attr(gnu_time64_abi, link_name = "__ioctl_time64")]
13961409
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
13971410
pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int;
1411+
#[cfg_attr(gnu_time64_abi, link_name = "__glob64_time64")]
13981412
pub fn glob64(
13991413
pattern: *const ::c_char,
14001414
flags: ::c_int,
14011415
errfunc: ::Option<extern "C" fn(epath: *const ::c_char, errno: ::c_int) -> ::c_int>,
14021416
pglob: *mut glob64_t,
14031417
) -> ::c_int;
1418+
#[cfg_attr(gnu_time64_abi, link_name = "__globfree64_time64")]
14041419
pub fn globfree64(pglob: *mut glob64_t);
14051420
pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
14061421
pub fn pthread_attr_getaffinity_np(
@@ -1468,6 +1483,7 @@ extern "C" {
14681483
pub fn eaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int;
14691484

14701485
pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char;
1486+
#[cfg_attr(gnu_time64_abi, link_name = "__ctime64_r")]
14711487
pub fn ctime_r(timep: *const time_t, buf: *mut ::c_char) -> *mut ::c_char;
14721488

14731489
pub fn strftime(

src/unix/linux_like/linux/mod.rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5305,17 +5305,24 @@ safe_f! {
53055305
cfg_if! {
53065306
if #[cfg(all(not(target_env = "uclibc"), not(target_env = "ohos")))] {
53075307
extern "C" {
5308+
#[cfg_attr(gnu_time64_abi, link_name = "aio_read64")]
53085309
pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
5310+
#[cfg_attr(gnu_time64_abi, link_name = "aio_write64")]
53095311
pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
53105312
pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
5313+
#[cfg_attr(gnu_time64_abi, link_name = "aio_error64")]
53115314
pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
5315+
#[cfg_attr(gnu_time64_abi, link_name = "aio_return64")]
53125316
pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
5317+
#[cfg_attr(gnu_time64_abi, link_name = "__aio_suspend_time64")]
53135318
pub fn aio_suspend(
53145319
aiocb_list: *const *const aiocb,
53155320
nitems: ::c_int,
53165321
timeout: *const ::timespec,
53175322
) -> ::c_int;
5323+
#[cfg_attr(gnu_time64_abi, link_name = "aio_cancel64")]
53185324
pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
5325+
#[cfg_attr(gnu_time64_abi, link_name = "lio_listio64")]
53195326
pub fn lio_listio(
53205327
mode: ::c_int,
53215328
aiocb_list: *const *mut aiocb,
@@ -5329,12 +5336,14 @@ cfg_if! {
53295336
cfg_if! {
53305337
if #[cfg(not(target_env = "uclibc"))] {
53315338
extern "C" {
5339+
#[cfg_attr(gnu_time64_abi, link_name = "pwritev64")]
53325340
pub fn pwritev(
53335341
fd: ::c_int,
53345342
iov: *const ::iovec,
53355343
iovcnt: ::c_int,
53365344
offset: ::off_t,
53375345
) -> ::ssize_t;
5346+
#[cfg_attr(gnu_time64_abi, link_name = "preadv64")]
53385347
pub fn preadv(
53395348
fd: ::c_int,
53405349
iov: *const ::iovec,
@@ -5370,6 +5379,7 @@ cfg_if! {
53705379
riovcnt: ::c_ulong,
53715380
flags: ::c_ulong,
53725381
) -> isize;
5382+
#[cfg_attr(gnu_time64_abi, link_name = "__futimes64")]
53735383
pub fn futimes(
53745384
fd: ::c_int,
53755385
times: *const ::timeval
@@ -5402,6 +5412,7 @@ cfg_if! {
54025412
msg_len: ::size_t,
54035413
msg_prio: *mut ::c_uint,
54045414
) -> ::ssize_t;
5415+
#[cfg_attr(gnu_time64_abi, link_name = "__mq_timedreceive_time64")]
54055416
pub fn mq_timedreceive(
54065417
mqd: ::mqd_t,
54075418
msg_ptr: *mut ::c_char,
@@ -5415,6 +5426,7 @@ cfg_if! {
54155426
msg_len: ::size_t,
54165427
msg_prio: ::c_uint,
54175428
) -> ::c_int;
5429+
#[cfg_attr(gnu_time64_abi, link_name = "__mq_timedsend_time64")]
54185430
pub fn mq_timedsend(
54195431
mqd: ::mqd_t,
54205432
msg_ptr: *const ::c_char,
@@ -5465,6 +5477,7 @@ extern "C" {
54655477
pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort;
54665478
pub fn lcong48(p: *mut ::c_ushort);
54675479

5480+
#[cfg_attr(gnu_time64_abi, link_name = "__lutimes64")]
54685481
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
54695482

54705483
pub fn setpwent();
@@ -5486,11 +5499,14 @@ extern "C" {
54865499
pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int;
54875500
pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void;
54885501
pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int;
5502+
#[cfg_attr(gnu_time64_abi, link_name = "__shmctl64")]
54895503
pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int;
54905504
pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
54915505
pub fn semget(key: ::key_t, nsems: ::c_int, semflag: ::c_int) -> ::c_int;
54925506
pub fn semop(semid: ::c_int, sops: *mut ::sembuf, nsops: ::size_t) -> ::c_int;
5507+
#[cfg_attr(gnu_time64_abi, link_name = "__semctl64")]
54935508
pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int;
5509+
#[cfg_attr(gnu_time64_abi, link_name = "__msgctl64")]
54945510
pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int;
54955511
pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
54965512
pub fn msgrcv(
@@ -5510,7 +5526,9 @@ extern "C" {
55105526
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int;
55115527
pub fn __errno_location() -> *mut ::c_int;
55125528

5529+
#[cfg_attr(gnu_time64_abi, link_name = "fallocate64")]
55135530
pub fn fallocate(fd: ::c_int, mode: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int;
5531+
#[cfg_attr(gnu_time64_abi, link_name = "posix_fallocate64")]
55145532
pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int;
55155533
pub fn readahead(fd: ::c_int, offset: ::off64_t, count: ::size_t) -> ::ssize_t;
55165534
pub fn getxattr(
@@ -5560,7 +5578,9 @@ extern "C" {
55605578
pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int;
55615579
pub fn signalfd(fd: ::c_int, mask: *const ::sigset_t, flags: ::c_int) -> ::c_int;
55625580
pub fn timerfd_create(clockid: ::clockid_t, flags: ::c_int) -> ::c_int;
5581+
#[cfg_attr(gnu_time64_abi, link_name = "__timerfd_gettime64")]
55635582
pub fn timerfd_gettime(fd: ::c_int, curr_value: *mut itimerspec) -> ::c_int;
5583+
#[cfg_attr(gnu_time64_abi, link_name = "__timerfd_settime64")]
55645584
pub fn timerfd_settime(
55655585
fd: ::c_int,
55665586
flags: ::c_int,
@@ -5581,8 +5601,11 @@ extern "C" {
55815601
sigmask: *const ::sigset_t,
55825602
) -> ::c_int;
55835603
pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int;
5604+
#[cfg_attr(gnu_time64_abi, link_name = "mkostemp64")]
55845605
pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
5606+
#[cfg_attr(gnu_time64_abi, link_name = "mkostemps64")]
55855607
pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int;
5608+
#[cfg_attr(gnu_time64_abi, link_name = "__sigtimedwait64")]
55865609
pub fn sigtimedwait(
55875610
set: *const sigset_t,
55885611
info: *mut siginfo_t,
@@ -5629,12 +5652,14 @@ extern "C" {
56295652
...
56305653
) -> *mut ::c_void;
56315654

5655+
#[cfg_attr(gnu_time64_abi, link_name = "__glob64_time64")]
56325656
pub fn glob(
56335657
pattern: *const c_char,
56345658
flags: ::c_int,
56355659
errfunc: ::Option<extern "C" fn(epath: *const c_char, errno: ::c_int) -> ::c_int>,
56365660
pglob: *mut ::glob_t,
56375661
) -> ::c_int;
5662+
#[cfg_attr(gnu_time64_abi, link_name = "__globfree64_time64")]
56385663
pub fn globfree(pglob: *mut ::glob_t);
56395664

56405665
pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int;
@@ -5660,6 +5685,7 @@ extern "C" {
56605685
addr: *mut ::sockaddr,
56615686
addrlen: *mut ::socklen_t,
56625687
) -> ::ssize_t;
5688+
#[cfg_attr(gnu_time64_abi, link_name = "mkstemps64")]
56635689
pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
56645690

56655691
pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
@@ -5696,6 +5722,7 @@ extern "C" {
56965722
pub fn umount(target: *const ::c_char) -> ::c_int;
56975723
pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
56985724
pub fn tee(fd_in: ::c_int, fd_out: ::c_int, len: ::size_t, flags: ::c_uint) -> ::ssize_t;
5725+
#[cfg_attr(gnu_time64_abi, link_name = "__settimeofday64")]
56995726
pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
57005727
pub fn splice(
57015728
fd_in: ::c_int,
@@ -5709,7 +5736,9 @@ extern "C" {
57095736
pub fn eventfd_read(fd: ::c_int, value: *mut eventfd_t) -> ::c_int;
57105737
pub fn eventfd_write(fd: ::c_int, value: eventfd_t) -> ::c_int;
57115738

5739+
#[cfg_attr(gnu_time64_abi, link_name = "__sched_rr_get_interval64")]
57125740
pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int;
5741+
#[cfg_attr(gnu_time64_abi, link_name = "__sem_timedwait64")]
57135742
pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int;
57145743
pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int;
57155744
pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int;
@@ -5729,8 +5758,10 @@ extern "C" {
57295758
data: *const ::c_void,
57305759
) -> ::c_int;
57315760
pub fn personality(persona: ::c_ulong) -> ::c_int;
5761+
#[cfg_attr(gnu_time64_abi, link_name = "__prctl_time64")]
57325762
pub fn prctl(option: ::c_int, ...) -> ::c_int;
57335763
pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int;
5764+
#[cfg_attr(gnu_time64_abi, link_name = "__ppoll64")]
57345765
pub fn ppoll(
57355766
fds: *mut ::pollfd,
57365767
nfds: nfds_t,
@@ -5746,6 +5777,7 @@ extern "C" {
57465777
protocol: ::c_int,
57475778
) -> ::c_int;
57485779

5780+
#[cfg_attr(gnu_time64_abi, link_name = "__pthread_mutex_timedlock64")]
57495781
pub fn pthread_mutex_timedlock(
57505782
lock: *mut pthread_mutex_t,
57515783
abstime: *const ::timespec,
@@ -5780,6 +5812,7 @@ extern "C" {
57805812
...
57815813
) -> ::c_int;
57825814
pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
5815+
#[cfg_attr(gnu_time64_abi, link_name = "__clock_nanosleep_time64")]
57835816
pub fn clock_nanosleep(
57845817
clk_id: ::clockid_t,
57855818
flags: ::c_int,
@@ -5831,6 +5864,7 @@ extern "C" {
58315864
policy: ::c_int,
58325865
param: *const ::sched_param,
58335866
) -> ::c_int;
5867+
#[cfg_attr(gnu_time64_abi, link_name = "sendfile64")]
58345868
pub fn sendfile(
58355869
out_fd: ::c_int,
58365870
in_fd: ::c_int,
@@ -6049,7 +6083,9 @@ extern "C" {
60496083
) -> ::c_int;
60506084
pub fn timer_delete(timerid: ::timer_t) -> ::c_int;
60516085
pub fn timer_getoverrun(timerid: ::timer_t) -> ::c_int;
6086+
#[cfg_attr(gnu_time64_abi, link_name = "__timer_gettime64")]
60526087
pub fn timer_gettime(timerid: ::timer_t, curr_value: *mut ::itimerspec) -> ::c_int;
6088+
#[cfg_attr(gnu_time64_abi, link_name = "__timer_settime64")]
60536089
pub fn timer_settime(
60546090
timerid: ::timer_t,
60556091
flags: ::c_int,

src/unix/linux_like/mod.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,8 +1675,11 @@ extern "C" {
16751675
pub fn fdatasync(fd: ::c_int) -> ::c_int;
16761676
pub fn mincore(addr: *mut ::c_void, len: ::size_t, vec: *mut ::c_uchar) -> ::c_int;
16771677

1678+
#[cfg_attr(gnu_time64_abi, link_name = "__clock_getres64")]
16781679
pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
1680+
#[cfg_attr(gnu_time64_abi, link_name = "__clock_gettime64")]
16791681
pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
1682+
#[cfg_attr(gnu_time64_abi, link_name = "__clock_settime64")]
16801683
pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
16811684
pub fn clock_getcpuclockid(pid: ::pid_t, clk_id: *mut ::clockid_t) -> ::c_int;
16821685

@@ -1691,11 +1694,16 @@ extern "C" {
16911694
pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
16921695
pub fn setgroups(ngroups: ::size_t, ptr: *const ::gid_t) -> ::c_int;
16931696
pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int;
1697+
#[cfg_attr(gnu_time64_abi, link_name = "statfs64")]
16941698
pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
1699+
#[cfg_attr(gnu_time64_abi, link_name = "fstatfs64")]
16951700
pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
16961701
pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void;
1702+
#[cfg_attr(gnu_time64_abi, link_name = "posix_fadvise64")]
16971703
pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int;
1704+
#[cfg_attr(gnu_time64_abi, link_name = "__futimens64")]
16981705
pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int;
1706+
#[cfg_attr(gnu_time64_abi, link_name = "__utimensat64")]
16991707
pub fn utimensat(
17001708
dirfd: ::c_int,
17011709
path: *const ::c_char,
@@ -1741,6 +1749,7 @@ extern "C" {
17411749
pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void;
17421750
pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int;
17431751
pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int;
1752+
#[cfg_attr(gnu_time64_abi, link_name = "__wait4_time64")]
17441753
pub fn wait4(
17451754
pid: ::pid_t,
17461755
status: *mut ::c_int,
@@ -1761,7 +1770,9 @@ extern "C" {
17611770
pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t;
17621771
pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t;
17631772

1773+
#[cfg_attr(gnu_time64_abi, link_name = "__sendmsg64")]
17641774
pub fn sendmsg(fd: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t;
1775+
#[cfg_attr(gnu_time64_abi, link_name = "__recvmsg64")]
17651776
pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t;
17661777
pub fn uname(buf: *mut ::utsname) -> ::c_int;
17671778

@@ -1780,7 +1791,9 @@ cfg_if! {
17801791
pub fn fstatvfs64(fd: ::c_int, buf: *mut statvfs64) -> ::c_int;
17811792
pub fn statfs64(path: *const ::c_char, buf: *mut statfs64) -> ::c_int;
17821793
pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int;
1794+
#[cfg_attr(gnu_time64_abi, link_name = "__fstat64_time64")]
17831795
pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int;
1796+
#[cfg_attr(gnu_time64_abi, link_name = "__fstatat64_time64")]
17841797
pub fn fstatat64(
17851798
dirfd: ::c_int,
17861799
pathname: *const c_char,
@@ -1789,6 +1802,7 @@ cfg_if! {
17891802
) -> ::c_int;
17901803
pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int;
17911804
pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t;
1805+
#[cfg_attr(gnu_time64_abi, link_name = "__lstat64_time64")]
17921806
pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
17931807
pub fn mmap64(
17941808
addr: *mut ::c_void,
@@ -1824,6 +1838,7 @@ cfg_if! {
18241838
entry: *mut ::dirent64,
18251839
result: *mut *mut ::dirent64,
18261840
) -> ::c_int;
1841+
#[cfg_attr(gnu_time64_abi, link_name = "__stat64_time64")]
18271842
pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int;
18281843
pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int;
18291844
}

0 commit comments

Comments
 (0)