about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/i386/msgctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386/msgctl.c')
-rw-r--r--sysdeps/unix/sysv/linux/i386/msgctl.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/msgctl.c b/sysdeps/unix/sysv/linux/i386/msgctl.c
index 07b5d0d720..684365a922 100644
--- a/sysdeps/unix/sysv/linux/i386/msgctl.c
+++ b/sysdeps/unix/sysv/linux/i386/msgctl.c
@@ -26,6 +26,7 @@
 #include <sys/syscall.h>
 
 #include "kernel-features.h"
+#include <shlib-compat.h>
 
 struct __old_msqid_ds
 {
@@ -46,7 +47,9 @@ struct __old_msqid_ds
 
 /* Allows to control internal state and destruction of message queue
    objects.  */
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
 int __old_msgctl (int, int, struct __old_msqid_ds *);
+#endif
 int __new_msgctl (int, int, struct msqid_ds *);
 
 #ifdef __NR_getuid32
@@ -57,11 +60,14 @@ extern int __libc_missing_32bit_uids;
 # endif
 #endif
 
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_2)
 int
 __old_msgctl (int msqid, int cmd, struct __old_msqid_ds *buf)
 {
   return INLINE_SYSCALL (ipc, 5, IPCOP_msgctl, msqid, cmd, 0, buf);
 }
+compat_symbol (libc, __old_msgctl, msgctl, GLIBC_2_0);
+#endif
 
 int
 __new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
@@ -143,9 +149,4 @@ __new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
 #endif
 }
 
-#if defined PIC && DO_VERSIONING
-default_symbol_version (__new_msgctl, msgctl, GLIBC_2.2);
-symbol_version (__old_msgctl, msgctl, GLIBC_2.0);
-#else
-weak_alias (__new_msgctl, msgctl);
-#endif
+versioned_symbol (libc, __new_msgctl, msgctl, GLIBC_2_2);