about summary refs log tree commit diff
path: root/rt/shm_unlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'rt/shm_unlink.c')
-rw-r--r--rt/shm_unlink.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/rt/shm_unlink.c b/rt/shm_unlink.c
index a5af5ac147..85e9360e4c 100644
--- a/rt/shm_unlink.c
+++ b/rt/shm_unlink.c
@@ -17,13 +17,14 @@
    <https://www.gnu.org/licenses/>.  */
 
 #include <errno.h>
+#include <shlib-compat.h>
 #include <shm-directory.h>
 #include <string.h>
 #include <unistd.h>
 
 /* Remove shared memory object.  */
 int
-shm_unlink (const char *name)
+__shm_unlink (const char *name)
 {
   struct shmdir_name dirname;
   if (__shm_get_name (&dirname, name, false) != 0)
@@ -32,8 +33,13 @@ shm_unlink (const char *name)
       return -1;
     }
 
-  int result = unlink (dirname.name);
+  int result = __unlink (dirname.name);
   if (result < 0 && errno == EPERM)
     __set_errno (EACCES);
   return result;
 }
+versioned_symbol (libc, __shm_unlink, shm_unlink, GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_34)
+compat_symbol (libc, __shm_unlink, shm_unlink, GLIBC_2_2);
+#endif