From 983f43b57bc347717aca85616cbce731c7494ca3 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 25 Jun 2021 10:42:54 +0200 Subject: Linux: Move mq_open, __mq_open_2 from librt to libc The symbols were moved using scripts/move-symbol-to-libc.py. A placeholder symbol is required to keep the GLIBC_2.7 version. Reviewed-by: Adhemerva Zanella --- sysdeps/unix/sysv/linux/mq_open.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sysdeps/unix/sysv/linux/mq_open.c') diff --git a/sysdeps/unix/sysv/linux/mq_open.c b/sysdeps/unix/sysv/linux/mq_open.c index 667c5677e5..5464285ceb 100644 --- a/sysdeps/unix/sysv/linux/mq_open.c +++ b/sysdeps/unix/sysv/linux/mq_open.c @@ -21,6 +21,7 @@ #include #include #include +#include /* Establish connection between a process and a message queue NAME and return message queue descriptor or (mqd_t) -1 on error. OFLAG determines @@ -49,13 +50,20 @@ __mq_open (const char *name, int oflag, ...) return INLINE_SYSCALL (mq_open, 4, name + 1, oflag, mode, attr); } -strong_alias (__mq_open, mq_open); +versioned_symbol (libc, __mq_open, mq_open, GLIBC_2_34); +#if OTHER_SHLIB_COMPAT (librt, GLIBC_2_3_4, GLIBC_2_34) +compat_symbol (libc, __mq_open, mq_open, GLIBC_2_3_4); +#endif mqd_t -__mq_open_2 (const char *name, int oflag) +___mq_open_2 (const char *name, int oflag) { if (oflag & O_CREAT) __fortify_fail ("invalid mq_open call: O_CREAT without mode and attr"); return __mq_open (name, oflag); } +versioned_symbol (libc, ___mq_open_2, __mq_open_2, GLIBC_2_34); +#if OTHER_SHLIB_COMPAT (librt, GLIBC_2_7, GLIBC_2_34) +compat_symbol (libc, ___mq_open_2, __mq_open_2, GLIBC_2_7); +#endif -- cgit v1.2.3-70-g09d2