diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-06-21 08:25:15 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-06-21 08:25:15 +0200 |
commit | ae830b2d9f5238e1bee9820cd4d4df7f7b13ecff (patch) | |
tree | 0b3afe2777d45064178f549c15a674f110a4432a /rt/shm_unlink.c | |
parent | c6e7ec2f123bceb323836cc4558f9586959ebf58 (diff) | |
download | glibc-ae830b2d9f5238e1bee9820cd4d4df7f7b13ecff.tar.gz glibc-ae830b2d9f5238e1bee9820cd4d4df7f7b13ecff.tar.xz glibc-ae830b2d9f5238e1bee9820cd4d4df7f7b13ecff.zip |
rt: Move shm_unlink into libc
This function has no dependency on libpthread, so the move is also applied to Hurd. The symbol was moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'rt/shm_unlink.c')
-rw-r--r-- | rt/shm_unlink.c | 10 |
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 |