about summary refs log tree commit diff
path: root/rt/aio_fsync.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-06-25 10:30:36 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-06-25 11:50:24 +0200
commit1f3a8e716d44d1307fe057a5b9f542108e4fbd55 (patch)
tree4dd2b6f030465db2845e47e1e14fada7ff7417fb /rt/aio_fsync.c
parent1a7d0dedf0c579ff4c4146a861228bd381178905 (diff)
downloadglibc-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/aio_fsync.c')
-rw-r--r--rt/aio_fsync.c18
1 files changed, 14 insertions, 4 deletions
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 */