Skip to content

Commit 107177a

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 6b82eb2 commit 107177a

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
@@ -1289,12 +1289,14 @@ extern "C" {
12891289
>,
12901290
arg: *mut ::c_void,
12911291
);
1292+
#[cfg_attr(gnu_time64_abi, link_name = "__sendmmsg64")]
12921293
pub fn sendmmsg(
12931294
sockfd: ::c_int,
12941295
msgvec: *mut ::mmsghdr,
12951296
vlen: ::c_uint,
12961297
flags: ::c_int,
12971298
) -> ::c_int;
1299+
#[cfg_attr(gnu_time64_abi, link_name = "__recvmmsg64")]
12981300
pub fn recvmmsg(
12991301
sockfd: ::c_int,
13001302
msgvec: *mut ::mmsghdr,
@@ -1305,8 +1307,11 @@ extern "C" {
13051307

13061308
pub fn getrlimit64(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit64) -> ::c_int;
13071309
pub fn setrlimit64(resource: ::__rlimit_resource_t, rlim: *const ::rlimit64) -> ::c_int;
1310+
#[cfg_attr(gnu_time64_abi, link_name = "getrlimit64")]
13081311
pub fn getrlimit(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit) -> ::c_int;
1312+
#[cfg_attr(gnu_time64_abi, link_name = "setrlimit64")]
13091313
pub fn setrlimit(resource: ::__rlimit_resource_t, rlim: *const ::rlimit) -> ::c_int;
1314+
#[cfg_attr(gnu_time64_abi, link_name = "prlimit64")]
13101315
pub fn prlimit(
13111316
pid: ::pid_t,
13121317
resource: ::__rlimit_resource_t,
@@ -1329,6 +1334,7 @@ extern "C" {
13291334
pub fn endutxent();
13301335
pub fn getpt() -> ::c_int;
13311336
pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int;
1337+
#[cfg_attr(gnu_time64_abi, link_name = "__gettimeofday64")]
13321338
pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int;
13331339
pub fn statx(
13341340
dirfd: ::c_int,
@@ -1341,10 +1347,14 @@ extern "C" {
13411347
pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;
13421348
pub fn getauxval(type_: ::c_ulong) -> ::c_ulong;
13431349

1350+
#[cfg_attr(gnu_time64_abi, link_name = "___adjtimex64")]
13441351
pub fn adjtimex(buf: *mut timex) -> ::c_int;
1352+
#[cfg_attr(gnu_time64_abi, link_name = "___adjtimex64")]
13451353
pub fn ntp_adjtime(buf: *mut timex) -> ::c_int;
1346-
#[link_name = "ntp_gettimex"]
1354+
#[cfg_attr(not(gnu_time64_abi), link_name = "ntp_gettimex")]
1355+
#[cfg_attr(gnu_time64_abi, link_name = "__ntp_gettime64")]
13471356
pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int;
1357+
#[cfg_attr(gnu_time64_abi, link_name = "__clock_adjtime64")]
13481358
pub fn clock_adjtime(clk_id: ::clockid_t, buf: *mut ::timex) -> ::c_int;
13491359

13501360
pub fn fanotify_mark(
@@ -1354,13 +1364,15 @@ extern "C" {
13541364
dirfd: ::c_int,
13551365
path: *const ::c_char,
13561366
) -> ::c_int;
1367+
#[cfg_attr(gnu_time64_abi, link_name = "preadv64v2")]
13571368
pub fn preadv2(
13581369
fd: ::c_int,
13591370
iov: *const ::iovec,
13601371
iovcnt: ::c_int,
13611372
offset: ::off_t,
13621373
flags: ::c_int,
13631374
) -> ::ssize_t;
1375+
#[cfg_attr(gnu_time64_abi, link_name = "pwritev64v2")]
13641376
pub fn pwritev2(
13651377
fd: ::c_int,
13661378
iov: *const ::iovec,
@@ -1396,14 +1408,17 @@ extern "C" {
13961408
pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void;
13971409

13981410
pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char;
1411+
#[cfg_attr(gnu_time64_abi, link_name = "__ioctl_time64")]
13991412
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
14001413
pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int;
1414+
#[cfg_attr(gnu_time64_abi, link_name = "__glob64_time64")]
14011415
pub fn glob64(
14021416
pattern: *const ::c_char,
14031417
flags: ::c_int,
14041418
errfunc: ::Option<extern "C" fn(epath: *const ::c_char, errno: ::c_int) -> ::c_int>,
14051419
pglob: *mut glob64_t,
14061420
) -> ::c_int;
1421+
#[cfg_attr(gnu_time64_abi, link_name = "__globfree64_time64")]
14071422
pub fn globfree64(pglob: *mut glob64_t);
14081423
pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
14091424
pub fn pthread_attr_getaffinity_np(
@@ -1471,6 +1486,7 @@ extern "C" {
14711486
pub fn eaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int;
14721487

14731488
pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char;
1489+
#[cfg_attr(gnu_time64_abi, link_name = "__ctime64_r")]
14741490
pub fn ctime_r(timep: *const time_t, buf: *mut ::c_char) -> *mut ::c_char;
14751491

14761492
pub fn strftime(

src/unix/linux_like/linux/mod.rs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5340,17 +5340,24 @@ safe_f! {
53405340
cfg_if! {
53415341
if #[cfg(all(not(target_env = "uclibc"), not(target_env = "ohos")))] {
53425342
extern "C" {
5343+
#[cfg_attr(gnu_time64_abi, link_name = "aio_read64")]
53435344
pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
5345+
#[cfg_attr(gnu_time64_abi, link_name = "aio_write64")]
53445346
pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
53455347
pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
5348+
#[cfg_attr(gnu_time64_abi, link_name = "aio_error64")]
53465349
pub fn aio_error(aiocbp: *const aiocb) -> ::c_int;
5350+
#[cfg_attr(gnu_time64_abi, link_name = "aio_return64")]
53475351
pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t;
5352+
#[cfg_attr(gnu_time64_abi, link_name = "__aio_suspend_time64")]
53485353
pub fn aio_suspend(
53495354
aiocb_list: *const *const aiocb,
53505355
nitems: ::c_int,
53515356
timeout: *const ::timespec,
53525357
) -> ::c_int;
5358+
#[cfg_attr(gnu_time64_abi, link_name = "aio_cancel64")]
53535359
pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int;
5360+
#[cfg_attr(gnu_time64_abi, link_name = "lio_listio64")]
53545361
pub fn lio_listio(
53555362
mode: ::c_int,
53565363
aiocb_list: *const *mut aiocb,
@@ -5364,12 +5371,14 @@ cfg_if! {
53645371
cfg_if! {
53655372
if #[cfg(not(target_env = "uclibc"))] {
53665373
extern "C" {
5374+
#[cfg_attr(gnu_time64_abi, link_name = "pwritev64")]
53675375
pub fn pwritev(
53685376
fd: ::c_int,
53695377
iov: *const ::iovec,
53705378
iovcnt: ::c_int,
53715379
offset: ::off_t,
53725380
) -> ::ssize_t;
5381+
#[cfg_attr(gnu_time64_abi, link_name = "preadv64")]
53735382
pub fn preadv(
53745383
fd: ::c_int,
53755384
iov: *const ::iovec,
@@ -5405,6 +5414,7 @@ cfg_if! {
54055414
riovcnt: ::c_ulong,
54065415
flags: ::c_ulong,
54075416
) -> isize;
5417+
#[cfg_attr(gnu_time64_abi, link_name = "__futimes64")]
54085418
pub fn futimes(
54095419
fd: ::c_int,
54105420
times: *const ::timeval
@@ -5437,6 +5447,7 @@ cfg_if! {
54375447
msg_len: ::size_t,
54385448
msg_prio: *mut ::c_uint,
54395449
) -> ::ssize_t;
5450+
#[cfg_attr(gnu_time64_abi, link_name = "__mq_timedreceive_time64")]
54405451
pub fn mq_timedreceive(
54415452
mqd: ::mqd_t,
54425453
msg_ptr: *mut ::c_char,
@@ -5450,6 +5461,7 @@ cfg_if! {
54505461
msg_len: ::size_t,
54515462
msg_prio: ::c_uint,
54525463
) -> ::c_int;
5464+
#[cfg_attr(gnu_time64_abi, link_name = "__mq_timedsend_time64")]
54535465
pub fn mq_timedsend(
54545466
mqd: ::mqd_t,
54555467
msg_ptr: *const ::c_char,
@@ -5500,6 +5512,7 @@ extern "C" {
55005512
pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort;
55015513
pub fn lcong48(p: *mut ::c_ushort);
55025514

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

55055518
pub fn setpwent();
@@ -5521,11 +5534,14 @@ extern "C" {
55215534
pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int;
55225535
pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void;
55235536
pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int;
5537+
#[cfg_attr(gnu_time64_abi, link_name = "__shmctl64")]
55245538
pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int;
55255539
pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t;
55265540
pub fn semget(key: ::key_t, nsems: ::c_int, semflag: ::c_int) -> ::c_int;
55275541
pub fn semop(semid: ::c_int, sops: *mut ::sembuf, nsops: ::size_t) -> ::c_int;
5542+
#[cfg_attr(gnu_time64_abi, link_name = "__semctl64")]
55285543
pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int;
5544+
#[cfg_attr(gnu_time64_abi, link_name = "__msgctl64")]
55295545
pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int;
55305546
pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int;
55315547
pub fn msgrcv(
@@ -5545,7 +5561,9 @@ extern "C" {
55455561
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int;
55465562
pub fn __errno_location() -> *mut ::c_int;
55475563

5564+
#[cfg_attr(gnu_time64_abi, link_name = "fallocate64")]
55485565
pub fn fallocate(fd: ::c_int, mode: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int;
5566+
#[cfg_attr(gnu_time64_abi, link_name = "posix_fallocate64")]
55495567
pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int;
55505568
pub fn readahead(fd: ::c_int, offset: ::off64_t, count: ::size_t) -> ::ssize_t;
55515569
pub fn getxattr(
@@ -5595,7 +5613,9 @@ extern "C" {
55955613
pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int;
55965614
pub fn signalfd(fd: ::c_int, mask: *const ::sigset_t, flags: ::c_int) -> ::c_int;
55975615
pub fn timerfd_create(clockid: ::clockid_t, flags: ::c_int) -> ::c_int;
5616+
#[cfg_attr(gnu_time64_abi, link_name = "__timerfd_gettime64")]
55985617
pub fn timerfd_gettime(fd: ::c_int, curr_value: *mut itimerspec) -> ::c_int;
5618+
#[cfg_attr(gnu_time64_abi, link_name = "__timerfd_settime64")]
55995619
pub fn timerfd_settime(
56005620
fd: ::c_int,
56015621
flags: ::c_int,
@@ -5616,8 +5636,11 @@ extern "C" {
56165636
sigmask: *const ::sigset_t,
56175637
) -> ::c_int;
56185638
pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int;
5639+
#[cfg_attr(gnu_time64_abi, link_name = "mkostemp64")]
56195640
pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int;
5641+
#[cfg_attr(gnu_time64_abi, link_name = "mkostemps64")]
56205642
pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int;
5643+
#[cfg_attr(gnu_time64_abi, link_name = "__sigtimedwait64")]
56215644
pub fn sigtimedwait(
56225645
set: *const sigset_t,
56235646
info: *mut siginfo_t,
@@ -5664,12 +5687,14 @@ extern "C" {
56645687
...
56655688
) -> *mut ::c_void;
56665689

5690+
#[cfg_attr(gnu_time64_abi, link_name = "__glob64_time64")]
56675691
pub fn glob(
56685692
pattern: *const c_char,
56695693
flags: ::c_int,
56705694
errfunc: ::Option<extern "C" fn(epath: *const c_char, errno: ::c_int) -> ::c_int>,
56715695
pglob: *mut ::glob_t,
56725696
) -> ::c_int;
5697+
#[cfg_attr(gnu_time64_abi, link_name = "__globfree64_time64")]
56735698
pub fn globfree(pglob: *mut ::glob_t);
56745699

56755700
pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int;
@@ -5695,6 +5720,7 @@ extern "C" {
56955720
addr: *mut ::sockaddr,
56965721
addrlen: *mut ::socklen_t,
56975722
) -> ::ssize_t;
5723+
#[cfg_attr(gnu_time64_abi, link_name = "mkstemps64")]
56985724
pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int;
56995725

57005726
pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char;
@@ -5731,6 +5757,7 @@ extern "C" {
57315757
pub fn umount(target: *const ::c_char) -> ::c_int;
57325758
pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int;
57335759
pub fn tee(fd_in: ::c_int, fd_out: ::c_int, len: ::size_t, flags: ::c_uint) -> ::ssize_t;
5760+
#[cfg_attr(gnu_time64_abi, link_name = "__settimeofday64")]
57345761
pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int;
57355762
pub fn splice(
57365763
fd_in: ::c_int,
@@ -5744,7 +5771,9 @@ extern "C" {
57445771
pub fn eventfd_read(fd: ::c_int, value: *mut eventfd_t) -> ::c_int;
57455772
pub fn eventfd_write(fd: ::c_int, value: eventfd_t) -> ::c_int;
57465773

5774+
#[cfg_attr(gnu_time64_abi, link_name = "__sched_rr_get_interval64")]
57475775
pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int;
5776+
#[cfg_attr(gnu_time64_abi, link_name = "__sem_timedwait64")]
57485777
pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int;
57495778
pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int;
57505779
pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int;
@@ -5764,8 +5793,10 @@ extern "C" {
57645793
data: *const ::c_void,
57655794
) -> ::c_int;
57665795
pub fn personality(persona: ::c_ulong) -> ::c_int;
5796+
#[cfg_attr(gnu_time64_abi, link_name = "__prctl_time64")]
57675797
pub fn prctl(option: ::c_int, ...) -> ::c_int;
57685798
pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int;
5799+
#[cfg_attr(gnu_time64_abi, link_name = "__ppoll64")]
57695800
pub fn ppoll(
57705801
fds: *mut ::pollfd,
57715802
nfds: nfds_t,
@@ -5781,6 +5812,7 @@ extern "C" {
57815812
protocol: ::c_int,
57825813
) -> ::c_int;
57835814

5815+
#[cfg_attr(gnu_time64_abi, link_name = "__pthread_mutex_timedlock64")]
57845816
pub fn pthread_mutex_timedlock(
57855817
lock: *mut pthread_mutex_t,
57865818
abstime: *const ::timespec,
@@ -5815,6 +5847,7 @@ extern "C" {
58155847
...
58165848
) -> ::c_int;
58175849
pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
5850+
#[cfg_attr(gnu_time64_abi, link_name = "__clock_nanosleep_time64")]
58185851
pub fn clock_nanosleep(
58195852
clk_id: ::clockid_t,
58205853
flags: ::c_int,
@@ -5866,6 +5899,7 @@ extern "C" {
58665899
policy: ::c_int,
58675900
param: *const ::sched_param,
58685901
) -> ::c_int;
5902+
#[cfg_attr(gnu_time64_abi, link_name = "sendfile64")]
58695903
pub fn sendfile(
58705904
out_fd: ::c_int,
58715905
in_fd: ::c_int,
@@ -6084,7 +6118,9 @@ extern "C" {
60846118
) -> ::c_int;
60856119
pub fn timer_delete(timerid: ::timer_t) -> ::c_int;
60866120
pub fn timer_getoverrun(timerid: ::timer_t) -> ::c_int;
6121+
#[cfg_attr(gnu_time64_abi, link_name = "__timer_gettime64")]
60876122
pub fn timer_gettime(timerid: ::timer_t, curr_value: *mut ::itimerspec) -> ::c_int;
6123+
#[cfg_attr(gnu_time64_abi, link_name = "__timer_settime64")]
60886124
pub fn timer_settime(
60896125
timerid: ::timer_t,
60906126
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)