about summary refs log tree commit diff
path: root/socket
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-06-17 20:20:08 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-06-17 20:20:08 +0000
commit0595c98494c25f8eaa1a3298e8fa032ad5e4405e (patch)
treea3e0a10935b919b816c2f9033226b4a62dd415f2 /socket
parentdfa2d21450f44b3ea7129858764c1508d87ae27a (diff)
downloadglibc-0595c98494c25f8eaa1a3298e8fa032ad5e4405e.tar.gz
glibc-0595c98494c25f8eaa1a3298e8fa032ad5e4405e.tar.xz
glibc-0595c98494c25f8eaa1a3298e8fa032ad5e4405e.zip
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.
Diffstat (limited to 'socket')
-rw-r--r--socket/Versions1
-rw-r--r--socket/recv.c1
-rw-r--r--socket/socket.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/socket/Versions b/socket/Versions
index dcad32988f..7ce6f43841 100644
--- a/socket/Versions
+++ b/socket/Versions
@@ -39,5 +39,6 @@ libc {
   }
   GLIBC_PRIVATE {
     __sendmmsg;
+    __recv; __socket;
   }
 }
diff --git a/socket/recv.c b/socket/recv.c
index b1dc1f4f3e..63a9fcb8b7 100644
--- a/socket/recv.c
+++ b/socket/recv.c
@@ -30,6 +30,7 @@ __recv (fd, buf, n, flags)
   __set_errno (ENOSYS);
   return -1;
 }
+libc_hidden_def (__recv)
 weak_alias (__recv, recv)
 
 stub_warning (recv)
diff --git a/socket/socket.c b/socket/socket.c
index b7d4e3b999..9fe8fd9929 100644
--- a/socket/socket.c
+++ b/socket/socket.c
@@ -32,5 +32,6 @@ __socket (domain, type, protocol)
 }
 
 
+libc_hidden_def (__socket)
 weak_alias (__socket, socket)
 stub_warning (socket)