From 1a7d0dedf0c579ff4c4146a861228bd381178905 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 25 Jun 2021 10:30:36 +0200 Subject: Linux: Move aio_error, aio_error64 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_error.c | 21 ++++++++++++++++----- 3 files changed, 22 insertions(+), 7 deletions(-) (limited to 'rt') diff --git a/rt/Makefile b/rt/Makefile index 75a4d1c080..11924cd9ef 100644 --- a/rt/Makefile +++ b/rt/Makefile @@ -29,7 +29,6 @@ routines = \ shm_unlink \ librt-routines = \ - aio_error \ aio_fsync \ aio_read \ aio_read64 \ @@ -60,6 +59,7 @@ librt-shared-only-routines = librt-compat $(librt-routines-var) += \ aio_cancel \ + aio_error \ aio_misc \ aio_notify \ aio_sigqueue \ diff --git a/rt/Versions b/rt/Versions index 402a1188e7..aae1d3c47d 100644 --- a/rt/Versions +++ b/rt/Versions @@ -4,6 +4,8 @@ libc { aio_init; aio_cancel; aio_cancel64; + aio_error; + aio_error64; %endif } GLIBC_2.2 { @@ -15,6 +17,8 @@ libc { aio_cancel; aio_cancel64; aio_init; + aio_error; + aio_error64; %endif shm_open; shm_unlink; @@ -38,9 +42,9 @@ librt { %if !PTHREAD_IN_LIBC aio_cancel; aio_cancel64; -%endif aio_error; aio_error64; +%endif aio_fsync; aio_fsync64; %if !PTHREAD_IN_LIBC diff --git a/rt/aio_error.c b/rt/aio_error.c index ed664ae0ef..0e82283ca7 100644 --- a/rt/aio_error.c +++ b/rt/aio_error.c @@ -29,20 +29,31 @@ #undef aio_error64 #include - +#include +#include int -aio_error (const struct aiocb *aiocbp) +__aio_error (const struct aiocb *aiocbp) { int ret; /* Acquire the mutex to make sure all operations for this request are complete. */ - pthread_mutex_lock(&__aio_requests_mutex); + __pthread_mutex_lock (&__aio_requests_mutex); ret = aiocbp->__error_code; - pthread_mutex_unlock(&__aio_requests_mutex); + __pthread_mutex_unlock (&__aio_requests_mutex); return ret; } -weak_alias (aio_error, aio_error64) +#if PTHREAD_IN_LIBC +versioned_symbol (libc, __aio_error, aio_error, GLIBC_2_34); +versioned_symbol (libc, __aio_error, aio_error64, GLIBC_2_34); +# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_34) +compat_symbol (librt, __aio_error, aio_error, GLIBC_2_1); +compat_symbol (librt, __aio_error, aio_error64, GLIBC_2_1); +# endif +#else /* !PTHREAD_IN_LIBC */ +strong_alias (__aio_error, aio_error) +weak_alias (__aio_error, aio_error64) +#endif /* !PTHREAD_IN_LIBC */ -- cgit v1.2.1