about summary refs log tree commit diff
path: root/rt/aio_error.c
diff options
context:
space:
mode:
Diffstat (limited to 'rt/aio_error.c')
-rw-r--r--rt/aio_error.c21
1 files changed, 16 insertions, 5 deletions
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 <aio_misc.h>
-
+#include <pthreadP.h>
+#include <shlib-compat.h>
 
 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 */