From 1f3a8e716d44d1307fe057a5b9f542108e4fbd55 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 25 Jun 2021 10:30:36 +0200 Subject: Linux: Move aio_fsync, aio_fsync64 into libc The symbols were moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella --- rt/Makefile | 2 +- rt/Versions | 6 ++++-- rt/aio_fsync.c | 18 ++++++++++++++---- 3 files changed, 19 insertions(+), 7 deletions(-) (limited to 'rt') 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 #include - +#include 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 */ -- cgit 1.4.1