diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-06-25 10:30:36 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-06-25 11:50:24 +0200 |
commit | 1f3a8e716d44d1307fe057a5b9f542108e4fbd55 (patch) | |
tree | 4dd2b6f030465db2845e47e1e14fada7ff7417fb /rt | |
parent | 1a7d0dedf0c579ff4c4146a861228bd381178905 (diff) | |
download | glibc-1f3a8e716d44d1307fe057a5b9f542108e4fbd55.tar.gz glibc-1f3a8e716d44d1307fe057a5b9f542108e4fbd55.tar.xz glibc-1f3a8e716d44d1307fe057a5b9f542108e4fbd55.zip |
Linux: Move aio_fsync, aio_fsync64 into libc
The symbols were moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'rt')
-rw-r--r-- | rt/Makefile | 2 | ||||
-rw-r--r-- | rt/Versions | 6 | ||||
-rw-r--r-- | rt/aio_fsync.c | 18 |
3 files changed, 19 insertions, 7 deletions
diff --git a/rt/Makefile b/rt/Makefile index 11924cd9ef..119b757d2a 100644 --- a/rt/Makefile +++ b/rt/Makefile @@ -29,7 +29,6 @@ routines = \ shm_unlink \ librt-routines = \ - aio_fsync \ aio_read \ aio_read64 \ aio_return \ @@ -60,6 +59,7 @@ librt-shared-only-routines = librt-compat $(librt-routines-var) += \ aio_cancel \ aio_error \ + aio_fsync \ aio_misc \ aio_notify \ aio_sigqueue \ diff --git a/rt/Versions b/rt/Versions index aae1d3c47d..1a0aa77fd0 100644 --- a/rt/Versions +++ b/rt/Versions @@ -6,6 +6,8 @@ libc { aio_cancel64; aio_error; aio_error64; + aio_fsync; + aio_fsync64; %endif } GLIBC_2.2 { @@ -19,6 +21,8 @@ libc { aio_init; aio_error; aio_error64; + aio_fsync; + aio_fsync64; %endif shm_open; shm_unlink; @@ -44,10 +48,8 @@ librt { aio_cancel64; aio_error; aio_error64; -%endif aio_fsync; aio_fsync64; -%if !PTHREAD_IN_LIBC aio_init; %endif aio_read; diff --git a/rt/aio_fsync.c b/rt/aio_fsync.c index 5a52e2fec0..73b906a1e2 100644 --- a/rt/aio_fsync.c +++ b/rt/aio_fsync.c @@ -31,10 +31,10 @@ #include <fcntl.h> #include <aio_misc.h> - +#include <shlib-compat.h> int -aio_fsync (int op, struct aiocb *aiocbp) +__aio_fsync (int op, struct aiocb *aiocbp) { if (op != O_DSYNC && __builtin_expect (op != O_SYNC, 0)) { @@ -43,7 +43,7 @@ aio_fsync (int op, struct aiocb *aiocbp) } /* Verify that this is an open file descriptor. */ - if (__glibc_unlikely (fcntl (aiocbp->aio_fildes, F_GETFL) == -1)) + if (__glibc_unlikely (__fcntl (aiocbp->aio_fildes, F_GETFL) == -1)) { __set_errno (EBADF); return -1; @@ -54,4 +54,14 @@ aio_fsync (int op, struct aiocb *aiocbp) ? -1 : 0); } -weak_alias (aio_fsync, aio_fsync64) +#if PTHREAD_IN_LIBC +versioned_symbol (libc, __aio_fsync, aio_fsync, GLIBC_2_34); +versioned_symbol (libc, __aio_fsync, aio_fsync64, GLIBC_2_34); +# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_34) +compat_symbol (librt, __aio_fsync, aio_fsync, GLIBC_2_1); +compat_symbol (librt, __aio_fsync, aio_fsync64, GLIBC_2_1); +# endif +#else /* !PTHREAD_IN_LIBC */ +strong_alias (__aio_fsync, aio_fsync) +weak_alias (__aio_fsync, aio_fsync64) +#endif /* !PTHREAD_IN_LIBC */ |