From 0595c98494c25f8eaa1a3298e8fa032ad5e4405e Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 17 Jun 2015 20:20:08 +0000 Subject: Fix mq_notify socket, recv namespace (bug 18546). mq_notify (in the 1996 edition of POSIX) brings in references to recv and socket (not in POSIX until the 2001 edition). This patch fixes this by using __recv and __socket, exporting them from libc at version GLIBC_PRIVATE. Tested for x86_64 and x86 (testsuite and comparison of installed stripped shared libraries; PLT / dynamic symbol table changes render the comparison not particularly useful for libc). [BZ #18546] * socket/recv.c (__recv): Use libc_hidden_def. * socket/socket.c (__socket): Likewise. * sysdeps/mach/hurd/recv.c (__recv): Likewise. * sysdeps/mach/hurd/socket.c (__socket): Likewise. * sysdeps/unix/sysv/linux/generic/recv.c (__recv): Likewise. * sysdeps/unix/sysv/linux/recv.c (__recv): Use libc_hidden_weak. * sysdeps/unix/sysv/linux/socket.c (__socket): Use libc_hidden_def. * sysdeps/unix/sysv/linux/x86_64/recv.c (__recv): Use libc_hidden_weak. * include/sys/socket.h (__socket): Do not use attribute_hidden. Use libc_hidden_proto. (__recv): Likewise. * socket/Versions (libc): Export __recv and __socket at version GLIBC_PRIVATE. * sysdeps/unix/sysv/linux/mq_notify.c (helper_thread): Call __recv instead of recv. (init_mq_netlink): Call __socket instead of socket. * conform/Makefile (test-xfail-POSIX/mqueue.h/linknamespace): Remove variable. --- sysdeps/mach/hurd/recv.c | 1 + sysdeps/mach/hurd/socket.c | 1 + 2 files changed, 2 insertions(+) (limited to 'sysdeps/mach/hurd') diff --git a/sysdeps/mach/hurd/recv.c b/sysdeps/mach/hurd/recv.c index 4d10106d5a..358380e7a6 100644 --- a/sysdeps/mach/hurd/recv.c +++ b/sysdeps/mach/hurd/recv.c @@ -60,4 +60,5 @@ __recv (fd, buf, n, flags) return nread; } +libc_hidden_def (__recv) weak_alias (__recv, recv) diff --git a/sysdeps/mach/hurd/socket.c b/sysdeps/mach/hurd/socket.c index f1f33db21f..bb7daddb5e 100644 --- a/sysdeps/mach/hurd/socket.c +++ b/sysdeps/mach/hurd/socket.c @@ -64,4 +64,5 @@ __socket (domain, type, protocol) return _hurd_intern_fd (sock, O_IGNORE_CTTY, 1); } +libc_hidden_def (__socket) weak_alias (__socket, socket) -- cgit v1.2.3