From 406fb327fb3b617d6abdd54bed2967c2a9f384c4 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 25 Jun 2021 10:30:36 +0200 Subject: Linux: Move aio_return, aio_return64 into libc The symbols were moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerva Zanella --- rt/Makefile | 2 +- rt/Versions | 6 +++++- rt/aio_return.c | 15 +++++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) (limited to 'rt') diff --git a/rt/Makefile b/rt/Makefile index ec2aff9ce4..29c9aa5f05 100644 --- a/rt/Makefile +++ b/rt/Makefile @@ -29,7 +29,6 @@ routines = \ shm_unlink \ librt-routines = \ - aio_return \ aio_suspend \ aio_write \ aio_write64 \ @@ -62,6 +61,7 @@ $(librt-routines-var) += \ aio_notify \ aio_read \ aio_read64 \ + aio_return \ aio_sigqueue \ tests := tst-shm tst-timer tst-timer2 \ diff --git a/rt/Versions b/rt/Versions index 6db40bebc4..0780dc8400 100644 --- a/rt/Versions +++ b/rt/Versions @@ -10,6 +10,8 @@ libc { aio_fsync64; aio_read; aio_read64; + aio_return; + aio_return64; %endif } GLIBC_2.2 { @@ -27,6 +29,8 @@ libc { aio_fsync64; aio_read; aio_read64; + aio_return; + aio_return64; %endif shm_open; shm_unlink; @@ -57,9 +61,9 @@ librt { aio_init; aio_read; aio_read64; -%endif aio_return; aio_return64; +%endif aio_suspend; aio_suspend64; aio_write; diff --git a/rt/aio_return.c b/rt/aio_return.c index cc50719dcb..a7a0b141d2 100644 --- a/rt/aio_return.c +++ b/rt/aio_return.c @@ -28,11 +28,22 @@ /* And undo the hack. */ #undef aio_return64 +#include ssize_t -aio_return (struct aiocb *aiocbp) +__aio_return (struct aiocb *aiocbp) { return aiocbp->__return_value; } -weak_alias (aio_return, aio_return64) +#if PTHREAD_IN_LIBC +versioned_symbol (libc, __aio_return, aio_return, GLIBC_2_34); +versioned_symbol (libc, __aio_return, aio_return64, GLIBC_2_34); +# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_34) +compat_symbol (librt, __aio_return, aio_return, GLIBC_2_1); +compat_symbol (librt, __aio_return, aio_return64, GLIBC_2_1); +# endif +#else /* !PTHREAD_IN_LIBC */ +strong_alias (__aio_return, aio_return) +weak_alias (__aio_return, aio_return64) +#endif -- cgit 1.4.1