This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.23-385-g222c2d7


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  222c2d7f4357d66073176f3beec67af40f0486c7 (commit)
       via  af7f7c7ec8dea1aad43f2cbed34c8a7c246fba97 (commit)
       via  abf29edd4a3918d80822e19b306aca004b84c21c (commit)
      from  1ced34c00a0aa26dca5aab811a967c1e52c33fe9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=222c2d7f4357d66073176f3beec67af40f0486c7

commit 222c2d7f4357d66073176f3beec67af40f0486c7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Thu Mar 17 09:52:17 2016 -0300

    network: recvmmsg and sendmmsg standard compliance (BZ#16919)
    
    POSIX specifies that both msghdr::msg_iovlen and msghdr::msg_controllen
    to be of size int and socklen_t respectively, however Linux implements
    it as a size_t.  So for 64-bits architecture where sizeof of size_t is
    larger than socklen_t, both sendmmsg and recvmmsg need to adjust the
    mmsghdr::msg_hdr internal fields before issuing the syscall itself.
    
    This patch fixes it by operating on the padding if it the case.
    For recvmmsg, the most straightfoward case, only zero padding the fields
    is suffice.  However, for sendmmsg, where adjusting the buffer is out
    of the contract (since it may point to a read-only data), the function
    is rewritten to use sendmsg instead (which from previous patch
    allocates a temporary msghdr to operate on).
    
    Also for 64-bit ports that requires it, a new recvmmsg and sendmmsg
    compat version is created (which uses size_t for both cmsghdr::cmsg_len
    and internal
    
    Tested on x86_64, i686, aarch64, armhf, and powerpc64le.
    
    	* sysdeps/unix/sysv/linux/Makefile
    	[$(subdir) = socket] (sysdep_routines): Add oldrecvmmsg and
    	oldsendmmsg.
    	* sysdeps/unix/sysv/linux/aarch64/libc.abilist: Add recvmmsg and
    	sendmmsg.
    	* sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise.
    	* sysdeps/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist:
    	Likewise.
    	* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/oldrecvmmsg.c: New file.
    	* sysdeps/unix/sysv/linux/oldsendmmsg.c: Likewise.
    	* sysdeps/unix/sysv/linux/recvmmsg.c (__recvmmsg): Adjust msghdr
    	iovlen and controllen fields to adjust to POSIX specification.
    	* sysdeps/unix/sysv/linux/sendmmsg.c (__sendmmsg): Likewise.

diff --git a/ChangeLog b/ChangeLog
index d16c2b7..c0b975e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,26 @@
 2016-05-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* sysdeps/unix/sysv/linux/Makefile
+	[$(subdir) = socket] (sysdep_routines): Add oldrecvmmsg and
+	oldsendmmsg.
+	* sysdeps/unix/sysv/linux/aarch64/libc.abilist: Add recvmmsg and
+	sendmmsg.
+	* sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise.
+	* sysdeps/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist:
+	Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/oldrecvmmsg.c: New file.
+	* sysdeps/unix/sysv/linux/oldsendmmsg.c: Likewise.
+	* sysdeps/unix/sysv/linux/recvmmsg.c (__recvmmsg): Adjust msghdr
+	iovlen and controllen fields to adjust to POSIX specification.
+	* sysdeps/unix/sysv/linux/sendmmsg.c (__sendmmsg): Likewise.
+
 	* conform/data/sys/socket.h-data (msghdr.msg_iovlen): Remove xfail-
 	and change to correct expected type.
 	(msghdr.msg_controllen): Likewise.
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index bbba51b..c57575f 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -124,7 +124,8 @@ ifeq ($(subdir),socket)
 sysdep_headers += net/if_ppp.h net/ppp-comp.h \
 		  net/ppp_defs.h net/if_arp.h net/route.h net/ethernet.h \
 		  net/if_slip.h net/if_packet.h net/if_shaper.h
-sysdep_routines += cmsg_nxthdr oldrecvmsg oldsendmsg
+sysdep_routines += cmsg_nxthdr oldrecvmsg oldsendmsg \
+		   oldrecvmmsg oldsendmmsg
 CFLAGS-recvmsg.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-sendmsg.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-oldrecvmsg.c = -fexceptions -fasynchronous-unwind-tables
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index c3f2346..7981817 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2088,5 +2088,7 @@ GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmmsg F
 GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmmsg F
 GLIBC_2.24 sendmsg F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index 7822242..0c1e1ac 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -1999,7 +1999,9 @@ GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmmsg F
 GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmmsg F
 GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index f5739b4..b1388d1 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -1875,7 +1875,9 @@ GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmmsg F
 GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmmsg F
 GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index 6722f90..0e2ff75 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -1933,7 +1933,9 @@ GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmmsg F
 GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmmsg F
 GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
diff --git a/sysdeps/unix/sysv/linux/recvmmsg.c b/sysdeps/unix/sysv/linux/oldrecvmmsg.c
similarity index 71%
copy from sysdeps/unix/sysv/linux/recvmmsg.c
copy to sysdeps/unix/sysv/linux/oldrecvmmsg.c
index bf18260..4bf849b 100644
--- a/sysdeps/unix/sysv/linux/recvmmsg.c
+++ b/sysdeps/unix/sysv/linux/oldrecvmmsg.c
@@ -1,6 +1,6 @@
-/* Copyright (C) 2010-2016 Free Software Foundation, Inc.
+/* Compatibility version of recvmsg.
+   Copyright (C) 2010-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Andreas Schwab <schwab@redhat.com>, 2010.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -16,45 +16,34 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
 #include <sys/socket.h>
-
 #include <sysdep-cancel.h>
-#include <sys/syscall.h>
-#include <kernel-features.h>
+#include <socketcall.h>
+#include <shlib-compat.h>
+
+#if __WORDSIZE == 64
+# if SHLIB_COMPAT (libc, GLIBC_2_12, GLIBC_2_24)
 
 /* Do not use the recvmmsg syscall on socketcall architectures unless
    it was added at the same time as the socketcall support or can be
    assumed to be present.  */
-#if defined __ASSUME_SOCKETCALL \
+#  if defined __ASSUME_SOCKETCALL \
     && !defined __ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL \
     && !defined __ASSUME_RECVMMSG_SYSCALL
-# undef __NR_recvmmsg
-#endif
+#   undef __NR_recvmmsg
+#  endif
 
-#ifdef __NR_recvmmsg
 int
-recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
-	  struct timespec *tmo)
+__old_recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen,
+		int flags, struct timespec *tmo)
 {
+#  ifdef __NR_recvmmsg
   return SYSCALL_CANCEL (recvmmsg, fd, vmessages, vlen, flags, tmo);
-}
-#elif defined __NR_socketcall
-# include <socketcall.h>
-# ifdef __ASSUME_RECVMMSG_SOCKETCALL
-int
-recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
-	  struct timespec *tmo)
-{
+#  elif defined __NR_socketcall
+#   ifdef __ASSUME_RECVMMSG_SOCKETCALL
   return SOCKETCALL_CANCEL (recvmmsg, fd, vmessages, vlen, flags, tmo);
-}
-# else
-static int have_recvmmsg;
-
-int
-recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
-	  struct timespec *tmo)
-{
+#   else
+  static int have_recvmmsg;
   if (__glibc_likely (have_recvmmsg >= 0))
     {
       int ret = SOCKETCALL_CANCEL (recvmmsg, fd, vmessages, vlen, flags,
@@ -86,8 +75,13 @@ recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
     }
   __set_errno (ENOSYS);
   return -1;
+#   endif /* __ASSUME_RECVMMSG_SOCKETCALL  */
+#  else
+  __set_errno (ENOSYS);
+  return -1;
+#  endif
 }
-# endif /* __ASSUME_RECVMMSG_SOCKETCALL  */
-#else
-# include <socket/recvmmsg.c>
-#endif
+compat_symbol (libc, __old_recvmmsg, recvmmsg, GLIBC_2_12);
+
+# endif /* SHLIB_COMPAT (libc, GLIBC_2_12, GLIBC_2_24)  */
+#endif /* __WORDSIZE == 64  */
diff --git a/sysdeps/unix/sysv/linux/sendmmsg.c b/sysdeps/unix/sysv/linux/oldsendmmsg.c
similarity index 60%
copy from sysdeps/unix/sysv/linux/sendmmsg.c
copy to sysdeps/unix/sysv/linux/oldsendmmsg.c
index 6e0d46b..e40c311 100644
--- a/sysdeps/unix/sysv/linux/sendmmsg.c
+++ b/sysdeps/unix/sysv/linux/oldsendmmsg.c
@@ -1,6 +1,6 @@
-/* Copyright (C) 2011-2016 Free Software Foundation, Inc.
+/* Compatibility implementation of sendmmsg.
+   Copyright (C) 2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
 
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
@@ -16,44 +16,25 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
 #include <sys/socket.h>
-
 #include <sysdep-cancel.h>
-#include <sys/syscall.h>
-#include <kernel-features.h>
+#include <socketcall.h>
+#include <shlib-compat.h>
 
-/* Do not use the sendmmsg syscall on socketcall architectures unless
-   it was added at the same time as the socketcall support or can be
-   assumed to be present.  */
-#if defined __ASSUME_SOCKETCALL \
-    && !defined __ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL \
-    && !defined __ASSUME_SENDMMSG_SYSCALL
-# undef __NR_sendmmsg
-#endif
+#if __WORDSIZE == 64
+# if SHLIB_COMPAT (libc, GLIBC_2_14, GLIBC_2_24)
 
-#ifdef __NR_sendmmsg
 int
-__sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
+__old_sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen,
+		int flags)
 {
+#  ifdef __NR_sendmmsg
   return SYSCALL_CANCEL (sendmmsg, fd, vmessages, vlen, flags);
-}
-libc_hidden_def (__sendmmsg)
-weak_alias (__sendmmsg, sendmmsg)
-#elif defined __NR_socketcall
-# include <socketcall.h>
-# ifdef __ASSUME_SENDMMSG_SOCKETCALL
-int
-__sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
-{
+#  elif defined __NR_socketcall
+#   ifdef __ASSUME_SENDMMSG_SOCKETCALL
   return SOCKETCALL_CANCEL (sendmmsg, fd, vmessages, vlen, flags);
-}
-# else
-static int have_sendmmsg;
-
-int
-__sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
-{
+#   else
+  static int have_sendmmsg;
   if (__glibc_likely (have_sendmmsg >= 0))
     {
       int ret = SOCKETCALL_CANCEL (sendmmsg, fd, vmessages, vlen, flags);
@@ -84,10 +65,12 @@ __sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
     }
   __set_errno (ENOSYS);
   return -1;
+#   endif /* __ASSUME_SENDMMSG_SOCKETCALL  */
+#  else /* defined __NR_socketcall  */
+  __set_errno (ENOSYS);
+  return -1;
+#  endif
 }
-# endif /* __ASSUME_SENDMMSG_SOCKETCALL  */
-libc_hidden_def (__sendmmsg)
-weak_alias (__sendmmsg, sendmmsg)
-#else
-# include <socket/sendmmsg.c>
-#endif
+compat_symbol (libc, __old_sendmmsg, sendmmsg, GLIBC_2_14);
+# endif /* SHLIB_COMPAT (libc, GLIBC_2_14, GLIBC_2_24)  */
+#endif /* __WORDSIZE == 64  */
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
index 7839b5a..85286c4 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
@@ -2176,5 +2176,7 @@ GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmmsg F
 GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmmsg F
 GLIBC_2.24 sendmsg F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
index 20d5a19..0abd098 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
@@ -90,7 +90,9 @@ GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmmsg F
 GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmmsg F
 GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 _Exit F
diff --git a/sysdeps/unix/sysv/linux/recvmmsg.c b/sysdeps/unix/sysv/linux/recvmmsg.c
index bf18260..08b89ba 100644
--- a/sysdeps/unix/sysv/linux/recvmmsg.c
+++ b/sysdeps/unix/sysv/linux/recvmmsg.c
@@ -16,12 +16,10 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
 #include <sys/socket.h>
-
+#include <socketcall.h>
 #include <sysdep-cancel.h>
-#include <sys/syscall.h>
-#include <kernel-features.h>
+#include <shlib-compat.h>
 
 /* Do not use the recvmmsg syscall on socketcall architectures unless
    it was added at the same time as the socketcall support or can be
@@ -32,31 +30,39 @@
 # undef __NR_recvmmsg
 #endif
 
-#ifdef __NR_recvmmsg
+static inline void
+adjust_mmsghdr (struct mmsghdr *vmessages, unsigned int vlen)
+{
+#if __WORDSIZE == 64
+  /* POSIX specifies that both msghdr::msg_iovlen and msghdr::msg_controllen
+     to be int and socklen_t respectively.  However Linux defines it as
+     both size_t.  So for 64-bit it requires some adjustments by zeroing
+     the pad fields.  */
+  struct mmsghdr *vmhdr = vmessages;
+  for (unsigned int i = 0; i != 0; i--, vmhdr++)
+    {
+      vmhdr->msg_hdr.__glibc_reserved1 = 0;
+      vmhdr->msg_hdr.__glibc_reserved2 = 0;
+    }
+#endif
+}
+
 int
-recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
-	  struct timespec *tmo)
+__recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen,
+		 int flags, struct timespec *tmo)
 {
+#ifdef __NR_recvmmsg
+  adjust_mmsghdr (vmessages, vlen);
   return SYSCALL_CANCEL (recvmmsg, fd, vmessages, vlen, flags, tmo);
-}
 #elif defined __NR_socketcall
-# include <socketcall.h>
 # ifdef __ASSUME_RECVMMSG_SOCKETCALL
-int
-recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
-	  struct timespec *tmo)
-{
+  adjust_mmsghdr (vmessages, vlen);
   return SOCKETCALL_CANCEL (recvmmsg, fd, vmessages, vlen, flags, tmo);
-}
 # else
-static int have_recvmmsg;
-
-int
-recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
-	  struct timespec *tmo)
-{
+  static int have_recvmmsg;
   if (__glibc_likely (have_recvmmsg >= 0))
     {
+      adjust_mmsghdr (vmessages, vlen);
       int ret = SOCKETCALL_CANCEL (recvmmsg, fd, vmessages, vlen, flags,
 				   tmo);
       /* The kernel returns -EINVAL for unknown socket operations.
@@ -86,8 +92,19 @@ recvmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
     }
   __set_errno (ENOSYS);
   return -1;
-}
 # endif /* __ASSUME_RECVMMSG_SOCKETCALL  */
 #else
-# include <socket/recvmmsg.c>
+# define STUB 1
+  __set_errno (ENOSYS);
+  return -1;
+#endif
+}
+#ifdef STUB
+stub_warning (recvmmsg)
+#endif
+
+#if __WORDSIZE == 64
+versioned_symbol (libc, __recvmmsg, recvmmsg, GLIBC_2_24);
+#else
+weak_alias (__recvmmsg, recvmmsg)
 #endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index 5892fcd..03a9b97 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -1872,7 +1872,9 @@ GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmmsg F
 GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmmsg F
 GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
diff --git a/sysdeps/unix/sysv/linux/sendmmsg.c b/sysdeps/unix/sysv/linux/sendmmsg.c
index 6e0d46b..9b19343 100644
--- a/sysdeps/unix/sysv/linux/sendmmsg.c
+++ b/sysdeps/unix/sysv/linux/sendmmsg.c
@@ -16,12 +16,10 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
 #include <sys/socket.h>
-
+#include <socketcall.h>
 #include <sysdep-cancel.h>
-#include <sys/syscall.h>
-#include <kernel-features.h>
+#include <shlib-compat.h>
 
 /* Do not use the sendmmsg syscall on socketcall architectures unless
    it was added at the same time as the socketcall support or can be
@@ -32,31 +30,53 @@
 # undef __NR_sendmmsg
 #endif
 
-#ifdef __NR_sendmmsg
+#if __WORDSIZE == 64
+static inline int
+send_mmsghdr (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
+{
+  /* Emulate kernel interface for vlen size.  */
+  if (vlen > IOV_MAX)
+    vlen = IOV_MAX;
+  if (vlen == 0)
+    return 0;
+  /* POSIX specifies that both msghdr::msg_iovlen and msghdr::msg_controllen
+     to be int and socklen_t respectively,  however Linux defines it as both
+     size_t.  So for 64-bit it requires some adjustments by copying to
+     temporary header and zeroing the pad fields.
+     The problem is sendmmsg's msghdr may points to an already-filled control
+     buffer and modifying it is not part of sendmmsg contract (the data may
+     be in ro map).  So interact over the msghdr calling the sendmsg that
+     adjust the header using a temporary buffer.  */
+  for (unsigned int i = 0; i < vlen; i++)
+    {
+      ssize_t ret = __sendmsg (fd, &vmessages[i].msg_hdr, flags);
+      if (ret < 0)
+	return -1;
+      vmessages[i].msg_len = ret;
+    }
+  return 1;
+}
+#endif
+
 int
 __sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
 {
+#if __WORDSIZE == 64
+  return send_mmsghdr (fd, vmessages, vlen, flags);
+#elif defined __NR_sendmmsg
   return SYSCALL_CANCEL (sendmmsg, fd, vmessages, vlen, flags);
-}
-libc_hidden_def (__sendmmsg)
-weak_alias (__sendmmsg, sendmmsg)
 #elif defined __NR_socketcall
-# include <socketcall.h>
 # ifdef __ASSUME_SENDMMSG_SOCKETCALL
-int
-__sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
-{
   return SOCKETCALL_CANCEL (sendmmsg, fd, vmessages, vlen, flags);
-}
 # else
-static int have_sendmmsg;
-
-int
-__sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
-{
+  static int have_sendmmsg;
   if (__glibc_likely (have_sendmmsg >= 0))
     {
+#  if __WORDSIZE == 64
+      int ret = send_mmsghdr (fd, vmessages, vlen, flags);
+#  else
       int ret = SOCKETCALL_CANCEL (sendmmsg, fd, vmessages, vlen, flags);
+#  endif
       /* The kernel returns -EINVAL for unknown socket operations.
 	 We need to convert that error to an ENOSYS error.  */
       if (__builtin_expect (ret < 0, 0)
@@ -84,10 +104,20 @@ __sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
     }
   __set_errno (ENOSYS);
   return -1;
-}
 # endif /* __ASSUME_SENDMMSG_SOCKETCALL  */
+#else /* defined __NR_socketcall  */
+# define STUB 1
+  __set_errno (ENOSYS);
+  return -1;
+#endif
+}
+#ifdef STUB
+stub_warning (sendmmsg)
+#endif
+
 libc_hidden_def (__sendmmsg)
-weak_alias (__sendmmsg, sendmmsg)
+#if __WORDSIZE == 64
+versioned_symbol (libc, __sendmmsg, sendmmsg, GLIBC_2_24);
 #else
-# include <socket/sendmmsg.c>
+weak_alias (__sendmmsg, sendmmsg)
 #endif
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index 015a2f1..38b976f 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -1901,7 +1901,9 @@ GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmmsg F
 GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmmsg F
 GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
index 1e160bd..07b1332 100644
--- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
@@ -2095,5 +2095,7 @@ GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmmsg F
 GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmmsg F
 GLIBC_2.24 sendmsg F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index 175339e..baea1f5 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -1852,7 +1852,9 @@ GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmmsg F
 GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmmsg F
 GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=af7f7c7ec8dea1aad43f2cbed34c8a7c246fba97

commit af7f7c7ec8dea1aad43f2cbed34c8a7c246fba97
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 18 17:34:33 2016 -0300

    network: recvmsg and sendmsg standard compliance (BZ#16919)
    
    POSIX specifies that both msghdr::msg_iovlen and msghdr::msg_controllen
    to be of size int and socklen_t respectively.  However Linux defines it as
    both size_t and for 64-bit it requires some adjustments to make the
    functions standard compliance.
    
    This patch fixes it by creating a temporary header and zeroing the pad
    fields for 64-bits architecture where size of size_t exceeds the size of
    the int.
    
    Also the new recvmsg and sendmsg implementation is only added on libc,
    with libpthread only containing a compat symbol.
    
    Tested on x86_64, i686, aarch64, armhf, and powerpc64le.
    
    	* conform/data/sys/socket.h-data (msghdr.msg_iovlen): Remove xfail-
    	and change to correct expected type.
    	(msghdr.msg_controllen): Likewise.
    	(cmsghdr.cmsg_len): Likewise.
    	* sysdeps/unix/sysv/linux/bits/socket.h (msghdr.msg_iovlen): Fix
    	expected POSIX assumption about the size.
    	(msghdr.msg_controllen): Likewise.
    	(msghdr.__glibc_reserved1): Likewise.
    	(msghdr.__glibc_reserved2): Likewise.
    	(cmsghdr.cmsg_len): Likewise.
    	(cmsghdr.__glibc_reserved1): Likewise.
    	* nptl/Makefile (libpthread-routines): Remove ptw-recvmsg and ptw-sendmsg.
    	Add ptw-oldrecvmsg and ptw-oldsendmsg.
    	(CFLAGS-sendmsg.c): Remove rule.
    	(CFLAGS-recvmsg.c): Likewise.
    	(CFLAGS-oldsendmsg.c): Add rule.
    	(CFLAGS-oldrecvmsg.c): Likewise.
    	* sysdeps/unix/sysv/linux/alpha/Versions [libc] (GLIBC_2.24): Add
    	recvmsg and sendmsg.
    	* sysdeps/unix/sysv/linux/aarch64/Version [libc] (GLIBC_2.24):
    	Likewise.
    	* sysdeps/unix/sysv/linux/arm/Versions [libc] (GLIBC_2.24): Likewise.
    	* sysdeps/unix/sysv/linux/hppa/Versions [libc] (GLIBC_2.24): Likewise.
    	* sysdeps/unix/sysv/linux/i386/Versions [libc] (GLIBC_2.24): Likewise.
    	* sysdeps/unix/sysv/linux/ia64/Versions [libc] (GLIBC_2.24): Likewise.
    	* sysdeps/unix/sysv/linux/m68k/Versions [libc] (GLIBC_2.24): Likewise.
    	* sysdeps/unix/sysv/linux/microblaze/Versions [libc] (GLIBC_2.24):
    	Likewise.
    	* sysdeps/unix/sysv/linux/mips/mips32/Versions [libc] (GLIBC_2.24):
    	Likewise.
    	* sysdeps/unix/sysv/linux/mips/mips64/n32/Versions [libc] (GLIBC_2.24):
    	Likewise.
    	* sysdeps/unix/sysv/linux/mips/mips64/Versions [libc] (GLIBC_2.24):
    	Likewise.
    	* sysdeps/unix/sysv/linux/nios2/Versions [libc] (GLIBC_2.24):
    	Likewise.
    	* sysdeps/unix/sysv/linux/powerpc/Versions [libc] (GLIBC_2.24):
    	Likewise.
    	* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions [libc]
    	(GLIBC_2.24): Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-32/Versions [libc] (GLIBC_2.24):
    	Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-64/Versions [libc] (GLIBC_2.24):
    	Likewise.
    	* sysdeps/unix/sysv/linux/sh/Versions [libc] (GLIBC_2.24): Likewise.
    	* sysdeps/unix/sysv/linux/sparc/Versions [libc] (GLIBC_2.24):
    	Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc64/Versions [libc] (GLIBC_2.24):
    	Likewise.
    	( sysdeps/unix/sysv/linux/tile/Versions [libc] (GLIBC_2.24):
    	Likewise.
    	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Versions [libc]
    	(GLIBC_2.24): Likewise.
    	( sysdeps/unix/sysv/linux/x86_64/64/Versions [libc] (GLIBC_2.24):
    	Likewise.
    	* sysdeps/unix/sysv/linux/x84_64/Versions [libc] (GLIBC_2.24):
    	Likewise.
    	* sysdeps/unix/sysv/linux/Makefile
    	[$(subdir) = socket)] (sysdep_headers): Add oldrecvmsg and oldsendmsg.
    	(CFLAGS-sendmsg.c): Add rule.
    	(CFLAGS-recvmsg.c): Likewise.
    	(CFLAGS-oldsendmsg.c): Likewise.
    	(CFLAGS-oldrecvmsg.c): Likewise.
    	* sysdeps/unix/sysv/linux/check_native.c (__check_native): Fix msghdr
    	initialization.
    	* sysdeps/unix/sysv/linux/check_pf.c (make_request): Likewise.
    	* sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_request): Likewise.
    	* sysdeps/unix/sysv/linux/oldrecvmsg.c: New file.
    	* sysdeps/unix/sysv/linux/oldsendmsg.c: Likewise.
    	* sysdeps/unix/sysv/linux/recvmsg.c (__libc_recvmsg): Adjust msghdr
    	iovlen and controllen fields to adjust to POSIX specification.
    	* sysdeps/unix/sysv/linux/sendmsg.c (__libc_sendmsg): Likewise.
    	* sysdeps/unix/sysv/linux/aarch64/libc.abilist: New version and
    	added recvmsg and sendmsg.
    	* sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise
    	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist:
    	Likewise.
    	* sysdeps/unix/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise.
    	* sysdepe/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise.
    	Likewise.
    	Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist: Likewise.
    	Likewise.
    	* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
    	* sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.

diff --git a/ChangeLog b/ChangeLog
index 8895413..d16c2b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,111 @@
 2016-05-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+	* conform/data/sys/socket.h-data (msghdr.msg_iovlen): Remove xfail-
+	and change to correct expected type.
+	(msghdr.msg_controllen): Likewise.
+	(cmsghdr.cmsg_len): Likewise.
+	* sysdeps/unix/sysv/linux/bits/socket.h (msghdr.msg_iovlen): Fix
+	expected POSIX assumption about the size.
+	(msghdr.msg_controllen): Likewise.
+	(msghdr.__glibc_reserved1): Likewise.
+	(msghdr.__glibc_reserved2): Likewise.
+	(cmsghdr.cmsg_len): Likewise.
+	(cmsghdr.__glibc_reserved1): Likewise.
+	* nptl/Makefile (libpthread-routines): Remove ptw-recvmsg and ptw-sendmsg.
+	Add ptw-oldrecvmsg and ptw-oldsendmsg.
+	(CFLAGS-sendmsg.c): Remove rule.
+	(CFLAGS-recvmsg.c): Likewise.
+	(CFLAGS-oldsendmsg.c): Add rule.
+	(CFLAGS-oldrecvmsg.c): Likewise.
+	* sysdeps/unix/sysv/linux/alpha/Versions [libc] (GLIBC_2.24): Add
+	recvmsg and sendmsg.
+	* sysdeps/unix/sysv/linux/aarch64/Version [libc] (GLIBC_2.24):
+	Likewise.
+	* sysdeps/unix/sysv/linux/arm/Versions [libc] (GLIBC_2.24): Likewise.
+	* sysdeps/unix/sysv/linux/hppa/Versions [libc] (GLIBC_2.24): Likewise.
+	* sysdeps/unix/sysv/linux/i386/Versions [libc] (GLIBC_2.24): Likewise.
+	* sysdeps/unix/sysv/linux/ia64/Versions [libc] (GLIBC_2.24): Likewise.
+	* sysdeps/unix/sysv/linux/m68k/Versions [libc] (GLIBC_2.24): Likewise.
+	* sysdeps/unix/sysv/linux/microblaze/Versions [libc] (GLIBC_2.24):
+	Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips32/Versions [libc] (GLIBC_2.24):
+	Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/Versions [libc] (GLIBC_2.24):
+	Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/Versions [libc] (GLIBC_2.24):
+	Likewise.
+	* sysdeps/unix/sysv/linux/nios2/Versions [libc] (GLIBC_2.24):
+	Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/Versions [libc] (GLIBC_2.24):
+	Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions [libc]
+	(GLIBC_2.24): Likewise.
+	* sysdeps/unix/sysv/linux/s390/s390-32/Versions [libc] (GLIBC_2.24):
+	Likewise.
+	* sysdeps/unix/sysv/linux/s390/s390-64/Versions [libc] (GLIBC_2.24):
+	Likewise.
+	* sysdeps/unix/sysv/linux/sh/Versions [libc] (GLIBC_2.24): Likewise.
+	* sysdeps/unix/sysv/linux/sparc/Versions [libc] (GLIBC_2.24):
+	Likewise.
+	* sysdeps/unix/sysv/linux/sparc/sparc64/Versions [libc] (GLIBC_2.24):
+	Likewise.
+	( sysdeps/unix/sysv/linux/tile/Versions [libc] (GLIBC_2.24):
+	Likewise.
+	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Versions [libc]
+	(GLIBC_2.24): Likewise.
+	( sysdeps/unix/sysv/linux/x86_64/64/Versions [libc] (GLIBC_2.24):
+	Likewise.
+	* sysdeps/unix/sysv/linux/x84_64/Versions [libc] (GLIBC_2.24):
+	Likewise.
+	* sysdeps/unix/sysv/linux/Makefile
+	[$(subdir) = socket)] (sysdep_headers): Add oldrecvmsg and oldsendmsg.
+	(CFLAGS-sendmsg.c): Add rule.
+	(CFLAGS-recvmsg.c): Likewise.
+	(CFLAGS-oldsendmsg.c): Likewise.
+	(CFLAGS-oldrecvmsg.c): Likewise.
+	* sysdeps/unix/sysv/linux/check_native.c (__check_native): Fix msghdr
+	initialization.
+	* sysdeps/unix/sysv/linux/check_pf.c (make_request): Likewise.
+	* sysdeps/unix/sysv/linux/ifaddrs.c (__netlink_request): Likewise.
+	* sysdeps/unix/sysv/linux/oldrecvmsg.c: New file.
+	* sysdeps/unix/sysv/linux/oldsendmsg.c: Likewise.
+	* sysdeps/unix/sysv/linux/recvmsg.c (__libc_recvmsg): Adjust msghdr
+	iovlen and controllen fields to adjust to POSIX specification.
+	* sysdeps/unix/sysv/linux/sendmsg.c (__libc_sendmsg): Likewise.
+	* sysdeps/unix/sysv/linux/aarch64/libc.abilist: New version and
+	added recvmsg and sendmsg.
+	* sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist:
+	Likewise.
+	* sysdeps/unix/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist: Likewise.
+	* sysdepe/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise.
+	Likewise.
+	Likewise.
+	* sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist: Likewise.
+	Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
+
 	* sysdeps/unix/sysv/linux/alpha/syscalls.list (recvmsg): Remove
 	from auto-generation.
 	(sendmsg): Likewise.
diff --git a/conform/data/sys/socket.h-data b/conform/data/sys/socket.h-data
index 442d4d2..3a6cf7c 100644
--- a/conform/data/sys/socket.h-data
+++ b/conform/data/sys/socket.h-data
@@ -22,10 +22,9 @@ type {struct msghdr}
 element {struct msghdr} {void*} msg_name
 element {struct msghdr} socklen_t msg_namelen
 element {struct msghdr} {struct iovec*} msg_iov
-// Bug 16919: wrong type for msg_iovlen and msg_controllen members.
-xfail-element {struct msghdr} int msg_iovlen
+element {struct msghdr} int msg_iovlen
 element {struct msghdr} {void*} msg_control
-xfail-element {struct msghdr} socklen_t msg_controllen
+element {struct msghdr} socklen_t msg_controllen
 element {struct msghdr} int msg_flags
 
 type {struct iovec}
@@ -35,8 +34,7 @@ element {struct iovec} size_t iov_len
 
 type {struct cmsghdr}
 
-// Bug 16919: wrong type for cmsg_len member.
-xfail-element {struct cmsghdr} socklen_t cmsg_len
+element {struct cmsghdr} socklen_t cmsg_len
 element {struct cmsghdr} int cmsg_level
 element {struct cmsghdr} int cmsg_type
 
diff --git a/nptl/Makefile b/nptl/Makefile
index dc3ccab..4240928 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -109,12 +109,13 @@ libpthread-routines = nptl-init vars events version pt-interp \
 		      lll_timedlock_wait lll_timedwait_tid \
 		      pt-fork pt-vfork \
 		      ptw-write ptw-read ptw-close ptw-fcntl ptw-accept \
-		      ptw-connect ptw-recv ptw-recvfrom ptw-recvmsg ptw-send \
-		      ptw-sendmsg ptw-sendto ptw-fsync ptw-lseek ptw-llseek \
+		      ptw-connect ptw-recv ptw-recvfrom ptw-send \
+		      ptw-sendto ptw-fsync ptw-lseek ptw-llseek \
 		      ptw-msync ptw-nanosleep ptw-open ptw-open64 ptw-pause \
 		      ptw-pread ptw-pread64 ptw-pwrite ptw-pwrite64 \
 		      ptw-tcdrain ptw-wait ptw-waitpid ptw-msgrcv ptw-msgsnd \
 		      ptw-sigwait ptw-sigsuspend \
+		      ptw-oldrecvmsg ptw-oldsendmsg \
 		      pt-raise pt-system \
 		      flockfile ftrylockfile funlockfile \
 		      sigaction \
@@ -204,10 +205,10 @@ CFLAGS-recv.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-send.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-accept.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-sendto.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-sendmsg.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-connect.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-recvmsg.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-recvfrom.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-oldrecvmsg.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-oldrecvfrom.c = -fexceptions -fasynchronous-unwind-tables
 
 CFLAGS-pt-system.c = -fexceptions
 
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 9b4e2e1..bbba51b 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -124,7 +124,11 @@ ifeq ($(subdir),socket)
 sysdep_headers += net/if_ppp.h net/ppp-comp.h \
 		  net/ppp_defs.h net/if_arp.h net/route.h net/ethernet.h \
 		  net/if_slip.h net/if_packet.h net/if_shaper.h
-sysdep_routines += cmsg_nxthdr
+sysdep_routines += cmsg_nxthdr oldrecvmsg oldsendmsg
+CFLAGS-recvmsg.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-sendmsg.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-oldrecvmsg.c = -fexceptions -fasynchronous-unwind-tables
+CFLAGS-oldsendmsg.c = -fexceptions -fasynchronous-unwind-tables
 endif
 
 ifeq ($(subdir),sunrpc)
diff --git a/sysdeps/unix/sysv/linux/aarch64/Versions b/sysdeps/unix/sysv/linux/aarch64/Versions
index 9bd87fe..ae3742c 100644
--- a/sysdeps/unix/sysv/linux/aarch64/Versions
+++ b/sysdeps/unix/sysv/linux/aarch64/Versions
@@ -5,6 +5,10 @@ ld {
   }
 }
 libc {
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
+
   GLIBC_PRIVATE {
     __vdso_clock_gettime;
     __vdso_clock_getres;
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index 5799239..c3f2346 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2087,3 +2087,6 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index 29b82f9..31abb22 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -85,6 +85,9 @@ libc {
     #errlist-compat	140
     _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
   GLIBC_PRIVATE {
     __libc_alpha_cache_shape;
   }
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index 0fa4ee9..7822242 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -1998,6 +1998,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 5ff2225..7e5ba53 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -7,6 +7,9 @@ libc {
   GLIBC_2.11 {
     fallocate64;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
   GLIBC_PRIVATE {
     # A copy of sigaction lives in libpthread, and needs these.
     __default_sa_restorer; __default_rt_sa_restorer;
diff --git a/sysdeps/unix/sysv/linux/arm/libc.abilist b/sysdeps/unix/sysv/linux/arm/libc.abilist
index db9fa35..2b2f9f0 100644
--- a/sysdeps/unix/sysv/linux/arm/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/libc.abilist
@@ -88,6 +88,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
diff --git a/sysdeps/unix/sysv/linux/bits/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index 2eb95f7..ef4629a 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -27,6 +27,8 @@
 #include <stddef.h>
 
 #include <sys/types.h>
+#include <endian.h>
+#include <bits/wordsize.h>
 
 /* Type for length arguments in socket calls.  */
 #ifndef __socklen_t_defined
@@ -250,13 +252,32 @@ struct msghdr
     socklen_t msg_namelen;	/* Length of address data.  */
 
     struct iovec *msg_iov;	/* Vector of data to send/receive into.  */
-    size_t msg_iovlen;		/* Number of elements in the vector.  */
+#if __WORDSIZE == 64
+# if __BYTE_ORDER == __BIG_ENDIAN
+    int __glibc_reserved1;	/* Pad to adjust Linux size to POSIX defined
+				   size for msg_iovlen.  */
+    int msg_iovlen;		/* Number of elements in the vector.  */
+# else
+    int msg_iovlen;
+    int __glibc_reserved1;
+# endif
+#else
+    int msg_iovlen;
+#endif
 
     void *msg_control;		/* Ancillary data (eg BSD filedesc passing). */
-    size_t msg_controllen;	/* Ancillary data buffer length.
-				   !! The type should be socklen_t but the
-				   definition of the kernel is incompatible
-				   with this.  */
+#if __WORDSIZE == 64
+# if __BYTE_ORDER == __BIG_ENDIAN
+    int __glibc_reserved2;	/* Pad to adjust Linux size to POSIX defined
+				   size for msg_controllen.  */
+    socklen_t msg_controllen;	/* Ancillary data buffer length.  */
+# else
+    socklen_t msg_controllen;
+    int __glibc_reserved2;
+# endif
+#else
+    socklen_t msg_controllen;
+#endif
 
     int msg_flags;		/* Flags on received message.  */
   };
@@ -264,11 +285,19 @@ struct msghdr
 /* Structure used for storage of ancillary data object information.  */
 struct cmsghdr
   {
-    size_t cmsg_len;		/* Length of data in cmsg_data plus length
-				   of cmsghdr structure.
-				   !! The type should be socklen_t but the
-				   definition of the kernel is incompatible
-				   with this.  */
+#if __WORDSIZE == 64
+# if __BYTE_ORDER == __BIG_ENDIAN
+    int __glibc_reserved1;	/* Pad toadjust Linux size to POSIX defined
+				   size for cmsg_len.  */
+    socklen_t cmsg_len;		/* Length of data in cmsg_data plus length
+				   of cmsghdr structure.  */
+# else
+    socklen_t cmsg_len;
+    int __glibc_reserved1;
+# endif
+#else
+    socklen_t cmsg_len;
+#endif
     int cmsg_level;		/* Originating protocol.  */
     int cmsg_type;		/* Protocol specific type.  */
 #if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L
diff --git a/sysdeps/unix/sysv/linux/check_native.c b/sysdeps/unix/sysv/linux/check_native.c
index b3cbbe3..a8e447e 100644
--- a/sysdeps/unix/sysv/linux/check_native.c
+++ b/sysdeps/unix/sysv/linux/check_native.c
@@ -111,10 +111,13 @@ __check_native (uint32_t a1_index, int *a1_native,
     {
       struct msghdr msg =
 	{
-	  (void *) &nladdr, sizeof (nladdr),
-	  &iov, 1,
-	  NULL, 0,
-	  0
+	  .msg_name = (void *) &nladdr,
+	  .msg_namelen =  sizeof (nladdr),
+	  .msg_iov = &iov,
+	  .msg_iovlen = 1,
+	  .msg_control = NULL,
+	  .msg_controllen = 0,
+	  .msg_flags = 0
 	};
 
       ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0));
diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
index d55953a..89e9031 100644
--- a/sysdeps/unix/sysv/linux/check_pf.c
+++ b/sysdeps/unix/sysv/linux/check_pf.c
@@ -158,10 +158,13 @@ make_request (int fd, pid_t pid)
     {
       struct msghdr msg =
 	{
-	  (void *) &nladdr, sizeof (nladdr),
-	  &iov, 1,
-	  NULL, 0,
-	  0
+	  .msg_name = (void *) &nladdr,
+	  .msg_namelen =  sizeof (nladdr),
+	  .msg_iov = &iov,
+	  .msg_iovlen = 1,
+	  .msg_control = NULL,
+	  .msg_controllen = 0,
+	  .msg_flags = 0
 	};
 
       ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0));
diff --git a/sysdeps/unix/sysv/linux/hppa/Versions b/sysdeps/unix/sysv/linux/hppa/Versions
index b5098b2..895696e 100644
--- a/sysdeps/unix/sysv/linux/hppa/Versions
+++ b/sysdeps/unix/sysv/linux/hppa/Versions
@@ -35,4 +35,7 @@ libc {
   GLIBC_2.19 {
     fanotify_mark;
   }
+  GLIBC_2.24 {
+    recvms; sendmsg;
+  }
 }
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index 1d30644..84e8431 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -1852,6 +1852,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/i386/Versions b/sysdeps/unix/sysv/linux/i386/Versions
index f3544ac..55d1277 100644
--- a/sysdeps/unix/sysv/linux/i386/Versions
+++ b/sysdeps/unix/sysv/linux/i386/Versions
@@ -45,6 +45,9 @@ libc {
     # f*
     fallocate64;
   }
+  GLIBC_2.24 {
+    recvms; sendmsg;
+  }
   GLIBC_PRIVATE {
     __modify_ldt;
   }
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index 8f3502d..0229cd6 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2010,6 +2010,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/ia64/Versions b/sysdeps/unix/sysv/linux/ia64/Versions
index b38d6ef..116f4e8 100644
--- a/sysdeps/unix/sysv/linux/ia64/Versions
+++ b/sysdeps/unix/sysv/linux/ia64/Versions
@@ -22,6 +22,9 @@ libc {
   GLIBC_2.2.6 {
     getunwind;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
 }
 libpthread {
   GLIBC_2.3.3 {
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index 921ec55..f5739b4 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -1874,6 +1874,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
index ca38d1a..54f1124 100644
--- a/sysdeps/unix/sysv/linux/ifaddrs.c
+++ b/sysdeps/unix/sysv/linux/ifaddrs.c
@@ -161,10 +161,13 @@ __netlink_request (struct netlink_handle *h, int type)
     {
       struct msghdr msg =
 	{
-	  (void *) &nladdr, sizeof (nladdr),
-	  &iov, 1,
-	  NULL, 0,
-	  0
+	  .msg_name = (void *) &nladdr,
+	  .msg_namelen =  sizeof (nladdr),
+	  .msg_iov = &iov,
+	  .msg_iovlen = 1,
+	  .msg_control = NULL,
+	  .msg_controllen = 0,
+	  .msg_flags = 0
 	};
 
       read_len = TEMP_FAILURE_RETRY (__recvmsg (h->fd, &msg, 0));
diff --git a/sysdeps/unix/sysv/linux/m68k/Versions b/sysdeps/unix/sysv/linux/m68k/Versions
index 7ecc96e..2dc2e83 100644
--- a/sysdeps/unix/sysv/linux/m68k/Versions
+++ b/sysdeps/unix/sysv/linux/m68k/Versions
@@ -40,6 +40,9 @@ libc {
   GLIBC_2.12 {
     __m68k_read_tp;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
   GLIBC_PRIVATE {
     __vdso_atomic_cmpxchg_32; __vdso_atomic_barrier;
   }
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index 019095b..3a498cb 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -89,6 +89,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.4 GLIBC_2.4 A
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0x98
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index a999a48..948b050 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -1966,6 +1966,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/microblaze/Versions b/sysdeps/unix/sysv/linux/microblaze/Versions
index aa48a3c..2e93b8a 100644
--- a/sysdeps/unix/sysv/linux/microblaze/Versions
+++ b/sysdeps/unix/sysv/linux/microblaze/Versions
@@ -2,4 +2,7 @@ libc {
   GLIBC_2.18 {
     fallocate64;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
 }
diff --git a/sysdeps/unix/sysv/linux/microblaze/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/libc.abilist
index 0a08bba..d7ba0be 100644
--- a/sysdeps/unix/sysv/linux/microblaze/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/libc.abilist
@@ -2087,3 +2087,6 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/Versions b/sysdeps/unix/sysv/linux/mips/mips32/Versions
index 9621fb5..c4f38d8 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/Versions
+++ b/sysdeps/unix/sysv/linux/mips/mips32/Versions
@@ -3,4 +3,7 @@ libc {
     getrlimit64;
     setrlimit64;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
 }
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index 2ab9e94..87bb49b 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -1941,6 +1941,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index b9b4b74..1a415ab 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -1939,6 +1939,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/Versions b/sysdeps/unix/sysv/linux/mips/mips64/n32/Versions
index 9621fb5..c4f38d8 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/Versions
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/Versions
@@ -3,4 +3,7 @@ libc {
     getrlimit64;
     setrlimit64;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
 }
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index 14e1236..949761b 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -1937,6 +1937,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/Versions b/sysdeps/unix/sysv/linux/mips/mips64/n64/Versions
new file mode 100644
index 0000000..517d79a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/Versions
@@ -0,0 +1,5 @@
+libc {
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
+}
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index 53e0c9a..6722f90 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -1932,6 +1932,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/nios2/Versions b/sysdeps/unix/sysv/linux/nios2/Versions
index e42c85f..93458f5 100644
--- a/sysdeps/unix/sysv/linux/nios2/Versions
+++ b/sysdeps/unix/sysv/linux/nios2/Versions
@@ -3,4 +3,7 @@ libc {
     _flush_cache;
     cacheflush;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
 }
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index dff1ee9..75ef1ab 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2128,3 +2128,6 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
diff --git a/sysdeps/unix/sysv/linux/recvmsg.c b/sysdeps/unix/sysv/linux/oldrecvmsg.c
similarity index 63%
copy from sysdeps/unix/sysv/linux/recvmsg.c
copy to sysdeps/unix/sysv/linux/oldrecvmsg.c
index 4caf22e..01c596e 100644
--- a/sysdeps/unix/sysv/linux/recvmsg.c
+++ b/sysdeps/unix/sysv/linux/oldrecvmsg.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 2015-2016 Free Software Foundation, Inc.
+/* Compatibility version of recvmsg.
+   Copyright (C) 2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -15,23 +16,25 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
-#include <signal.h>
 #include <sys/socket.h>
-
 #include <sysdep-cancel.h>
 #include <socketcall.h>
-#include <kernel-features.h>
-#include <sys/syscall.h>
+#include <shlib-compat.h>
+
+/* Both libc.so and libpthread.so provides sendmsg, so we need to
+   provide the compat symbol for both libraries.  */
+#if SHLIB_COMPAT (MODULE_NAME, GLIBC_2_0, GLIBC_2_24)
 
+/* We can use the same struct layout for old symbol version since
+   size is the same.  */
 ssize_t
-__libc_recvmsg (int fd, struct msghdr *msg, int flags)
+__old_recvmsg (int fd, struct msghdr *msg, int flags)
 {
-#ifdef __ASSUME_RECVMSG_SYSCALL
+# ifdef __ASSUME_RECVMSG_SYSCALL
   return SYSCALL_CANCEL (recvmsg, fd, msg, flags);
-#else
+# else
   return SOCKETCALL_CANCEL (recvmsg, fd, msg, flags);
-#endif
+# endif
 }
-weak_alias (__libc_recvmsg, recvmsg)
-weak_alias (__libc_recvmsg, __recvmsg)
+compat_symbol (MODULE_NAME, __old_recvmsg, recvmsg, GLIBC_2_0);
+#endif
diff --git a/sysdeps/unix/sysv/linux/sendmsg.c b/sysdeps/unix/sysv/linux/oldsendmsg.c
similarity index 62%
copy from sysdeps/unix/sysv/linux/sendmsg.c
copy to sysdeps/unix/sysv/linux/oldsendmsg.c
index 5b2741a..a96790a 100644
--- a/sysdeps/unix/sysv/linux/sendmsg.c
+++ b/sysdeps/unix/sysv/linux/oldsendmsg.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 2015-2016 Free Software Foundation, Inc.
+/* Compatibility implementation of sendmsg.
+   Copyright (C) 2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -15,23 +16,25 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
-#include <signal.h>
 #include <sys/socket.h>
-
 #include <sysdep-cancel.h>
 #include <socketcall.h>
-#include <kernel-features.h>
-#include <sys/syscall.h>
+#include <shlib-compat.h>
+
+/* Both libc.so and libpthread.so provides sendmsg, so we need to
+   provide the compat symbol for both libraries.  */
+#if SHLIB_COMPAT (MODULE_NAME, GLIBC_2_0, GLIBC_2_24)
 
+/* We can use the same struct layout for old symbol version since
+   size is the same.  */
 ssize_t
-__libc_sendmsg (int fd, const struct msghdr *msg, int flags)
+__old_sendmsg (int fd, const struct msghdr *msg, int flags)
 {
-#ifdef __ASSUME_SENDMSG_SYSCALL
+# ifdef __ASSUME_SENDMSG_SYSCALL
   return SYSCALL_CANCEL (sendmsg, fd, msg, flags);
-#else
+# else
   return SOCKETCALL_CANCEL (sendmsg, fd, msg, flags);
-#endif
+# endif
 }
-weak_alias (__libc_sendmsg, sendmsg)
-weak_alias (__libc_sendmsg, __sendmsg)
+compat_symbol (MODULE_NAME, __old_sendmsg, sendmsg, GLIBC_2_0);
+#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/Versions b/sysdeps/unix/sysv/linux/powerpc/Versions
index 8ebeea1..ab0db57 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Versions
+++ b/sysdeps/unix/sysv/linux/powerpc/Versions
@@ -5,6 +5,9 @@ ld {
   }
 }
 libc {
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
   GLIBC_PRIVATE {
     __vdso_get_tbfreq;
     __vdso_clock_gettime;
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 6861846..5a0890e 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -1970,6 +1970,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index fd611aa..adbe736 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -1975,6 +1975,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions b/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
index a8e88b8..53e5527 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
@@ -22,6 +22,9 @@ libc {
   GLIBC_2.17 {
     __ppc_get_timebase_freq;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
 }
 
 librt {
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
index a97bd43..7839b5a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
@@ -2175,3 +2175,6 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
index 00772cb..20d5a19 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
@@ -89,6 +89,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 _Exit F
 GLIBC_2.3 _IO_2_1_stderr_ D 0xe0
diff --git a/sysdeps/unix/sysv/linux/recvmsg.c b/sysdeps/unix/sysv/linux/recvmsg.c
index 4caf22e..25a3193 100644
--- a/sysdeps/unix/sysv/linux/recvmsg.c
+++ b/sysdeps/unix/sysv/linux/recvmsg.c
@@ -15,23 +15,43 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
-#include <signal.h>
 #include <sys/socket.h>
-
 #include <sysdep-cancel.h>
 #include <socketcall.h>
-#include <kernel-features.h>
-#include <sys/syscall.h>
+#include <shlib-compat.h>
 
 ssize_t
 __libc_recvmsg (int fd, struct msghdr *msg, int flags)
 {
+  ssize_t ret;
+
+  /* POSIX specifies that both msghdr::msg_iovlen and msghdr::msg_controllen
+     to be int and socklen_t respectively.  However Linux defines it as
+     both size_t.  So for 64-bit it requires some adjustments by copying to
+     temporary header and zeroing the pad fields.  */
+#if __WORDSIZE == 64
+  struct msghdr hdr, *orig = msg;
+  if (msg != NULL)
+    {
+      hdr = *msg;
+      hdr.__glibc_reserved1 = 0;
+      hdr.__glibc_reserved2 = 0;
+      msg = &hdr;
+    }
+#endif
+
 #ifdef __ASSUME_RECVMSG_SYSCALL
-  return SYSCALL_CANCEL (recvmsg, fd, msg, flags);
+  ret = SYSCALL_CANCEL (recvmsg, fd, msg, flags);
 #else
-  return SOCKETCALL_CANCEL (recvmsg, fd, msg, flags);
+  ret = SOCKETCALL_CANCEL (recvmsg, fd, msg, flags);
 #endif
+
+#if __WORDSIZE == 64
+  if (orig != NULL)
+    *orig = hdr;
+#endif
+
+  return ret;
 }
-weak_alias (__libc_recvmsg, recvmsg)
 weak_alias (__libc_recvmsg, __recvmsg)
+versioned_symbol (libc, __libc_recvmsg, recvmsg, GLIBC_2_24);
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/Versions b/sysdeps/unix/sysv/linux/s390/s390-32/Versions
index 1c120e8..afcc3fe 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/Versions
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/Versions
@@ -49,6 +49,9 @@ libc {
   GLIBC_2.11 {
     fallocate64;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
 }
 
 libutil {
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index 05cb85e..03983df 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -1970,6 +1970,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/Versions b/sysdeps/unix/sysv/linux/s390/s390-64/Versions
index 3f4d960..fde5aee 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/Versions
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/Versions
@@ -4,6 +4,9 @@ libc {
     __register_frame; __register_frame_table; __deregister_frame;
     __frame_state_for; __register_frame_info_table;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
 }
 
 librt {
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index 1af185f..5892fcd 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -1871,6 +1871,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/sendmsg.c b/sysdeps/unix/sysv/linux/sendmsg.c
index 5b2741a..a5ef238 100644
--- a/sysdeps/unix/sysv/linux/sendmsg.c
+++ b/sysdeps/unix/sysv/linux/sendmsg.c
@@ -15,23 +15,34 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <errno.h>
-#include <signal.h>
 #include <sys/socket.h>
-
 #include <sysdep-cancel.h>
 #include <socketcall.h>
-#include <kernel-features.h>
-#include <sys/syscall.h>
+#include <shlib-compat.h>
 
 ssize_t
 __libc_sendmsg (int fd, const struct msghdr *msg, int flags)
 {
+  /* POSIX specifies that both msghdr::msg_iovlen and msghdr::msg_controllen
+     to be int and socklen_t respectively.  However Linux defines it as
+     both size_t.  So for 64-bit it requires some adjustments by copying to
+     temporary header and zeroing the pad fields.  */
+#if __WORDSIZE == 64
+  struct msghdr hdr;
+  if (msg != NULL)
+    {
+      hdr = *msg;
+      hdr.__glibc_reserved1 = 0;
+      hdr.__glibc_reserved2 = 0;
+      msg = &hdr;
+    }
+#endif
+
 #ifdef __ASSUME_SENDMSG_SYSCALL
   return SYSCALL_CANCEL (sendmsg, fd, msg, flags);
 #else
   return SOCKETCALL_CANCEL (sendmsg, fd, msg, flags);
 #endif
 }
-weak_alias (__libc_sendmsg, sendmsg)
 weak_alias (__libc_sendmsg, __sendmsg)
+versioned_symbol (libc, __libc_sendmsg, sendmsg, GLIBC_2_24);
diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions
index e0938c4..ae5a00e 100644
--- a/sysdeps/unix/sysv/linux/sh/Versions
+++ b/sysdeps/unix/sysv/linux/sh/Versions
@@ -30,4 +30,7 @@ libc {
   GLIBC_2.16 {
     fanotify_mark;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
 }
diff --git a/sysdeps/unix/sysv/linux/sh/libc.abilist b/sysdeps/unix/sysv/linux/sh/libc.abilist
index e128692..a2d85e6 100644
--- a/sysdeps/unix/sysv/linux/sh/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/libc.abilist
@@ -1856,6 +1856,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/sparc/Versions b/sysdeps/unix/sysv/linux/sparc/Versions
index 4dc1cd7..adbdec5 100644
--- a/sysdeps/unix/sysv/linux/sparc/Versions
+++ b/sysdeps/unix/sysv/linux/sparc/Versions
@@ -29,6 +29,9 @@ libc {
 
     __getshmlba;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
 }
 
 libpthread {
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index eb14113..c51e790 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -1962,6 +1962,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/Versions b/sysdeps/unix/sysv/linux/sparc/sparc64/Versions
index fbea1bb..f950070 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/Versions
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/Versions
@@ -8,6 +8,9 @@ libc {
     # w*
     wordexp;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
 }
 
 librt {
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index 91b97ef..015a2f1 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -1900,6 +1900,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/tile/Versions b/sysdeps/unix/sysv/linux/tile/Versions
index 13da68f..a68e181 100644
--- a/sysdeps/unix/sysv/linux/tile/Versions
+++ b/sysdeps/unix/sysv/linux/tile/Versions
@@ -11,6 +11,9 @@ libc {
     fallocate64;
     set_dataplane;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
   GLIBC_PRIVATE {
     __syscall_error;
     __vdso_clock_gettime;
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist
index ffcc4a0..cd48be1 100644
--- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist
@@ -2094,3 +2094,6 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Versions b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Versions
new file mode 100644
index 0000000..517d79a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Versions
@@ -0,0 +1,5 @@
+libc {
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
+}
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
index a66e8ec..1e160bd 100644
--- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
@@ -2094,3 +2094,6 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist
index ffcc4a0..cd48be1 100644
--- a/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist
@@ -2094,3 +2094,6 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/Versions b/sysdeps/unix/sysv/linux/x86_64/64/Versions
new file mode 100644
index 0000000..517d79a
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/64/Versions
@@ -0,0 +1,5 @@
+libc {
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
+}
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index c6e3cd4..175339e 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -1851,6 +1851,9 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F
 GLIBC_2.3 GLIBC_2.3 A
 GLIBC_2.3 __ctype_b_loc F
 GLIBC_2.3 __ctype_tolower_loc F
diff --git a/sysdeps/unix/sysv/linux/x86_64/Versions b/sysdeps/unix/sysv/linux/x86_64/Versions
index 2a7ed28..bbef7e0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/Versions
+++ b/sysdeps/unix/sysv/linux/x86_64/Versions
@@ -6,6 +6,9 @@ libc {
 
     modify_ldt;
   }
+  GLIBC_2.24 {
+    recvmsg; sendmsg;
+  }
 }
 
 librt {
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index 04dc8e4..4f52e2e 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2094,3 +2094,6 @@ GLIBC_2.23 fts64_close F
 GLIBC_2.23 fts64_open F
 GLIBC_2.23 fts64_read F
 GLIBC_2.23 fts64_set F
+GLIBC_2.24 GLIBC_2.24 A
+GLIBC_2.24 recvmsg F
+GLIBC_2.24 sendmsg F

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=abf29edd4a3918d80822e19b306aca004b84c21c

commit abf29edd4a3918d80822e19b306aca004b84c21c
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Mar 15 17:42:26 2016 -0300

    Adjust kernel-features.h defaults for recvmsg and sendmsg
    
    This patch removes the auto-generation for recvmsg and sendmsg syscall
    and adjust the kernel-features.h for all architectures supported on
    Linux.  This patch follows the idea of 'Adjust kernel-features.h defaults
    for socket syscalls.' (35ade9f11b9007ee9683529f2d33698ff35255c8) by define
    __ASSUME_SENDMSG_SYSCALL and __ASSUME_RECVMSG_SYSCALL as supported by
    default and undefine it for the architecture that do not support it
    directly.
    
    The main rationale is to make is easier add code wrapper over the syscall
    to fix BZ#16919 (recvmsg standard compliance).
    
    Tested on x86_64, i686, aarch64, armhf, and powerpc64le.
    
    	* sysdeps/unix/sysv/linux/alpha/syscalls.list (recvmsg): Remove
    	from auto-generation.
    	(sendmsg): Likewise.
    	* sysdeps/unix/sysv/linux/arm/syscalls.list (recvmsg): Likewise.
    	(sendmsg): Likewise.
    	* sysdeps/unix/sysv/linux/generic/syscalls.list (recvmsg): Likewise.
    	(sendmsg): Likewise.
    	* sysdeps/unix/sysv/linux/hppa/syscalls.list (recvmsg): Likewise.
    	(sendmsg): Likewise.
    	* sysdeps/unix/sysv/linux/ia64/syscalls.list (recvmsg): Likewise.
    	(sendmsg): Likewise.
    	* sysdeps/unix/sysv/linux/mips/syscalls.list (recvmsg): Likewise.
    	(sendmsg): Likewise.
    	* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (recvmsg):
    	Likewise.
    	(sendmsg): Likewise.
    	* sysdeps/unix/sysv/linux/x86_64/syscalls.list (recvmsg): Likewise.
    	(sendmsg): Likewise.
    	* sysdeps/unix/sysv/linux/i386/kernel-features.h
    	[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL):
    	Remove.
    	[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL):
    	Likewise.
    	[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_SENDMSG_SYSCALL):
    	Undefine.
    	[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_RECVMSG_SYSCALL):
    	Likewise.
    	* sysdeps/unix/sysv/linux/kernel-features.h
    	(__ASSUME_SENDMSG_SYSCALL): Define.
    	(__ASSUME_RECVMSG_SYSCALL): Likewise.
    	* sysdeps/unix/sysv/linux/m68k/kernel-features.h
    	[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL):
    	Remove.
    	[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL):
    	Likewise.
    	[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_SENDMSG_SYSCALL):
    	Undefine.
    	[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_RECVMSG_SYSCALL):
    	Likewise.
    	* sysdeps/unix/sysv/linux/s390/kernel-features.h
    	[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL):
    	Remove.
    	[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL):
    	Likewise.
    	[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_SENDMSG_SYSCALL):
    	Undefine.
    	[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_RECVMSG_SYSCALL):
    	Likewise.
    	* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
    	(__ASSUME_SENDMSG_SYSCALL): Undefine.
    	(__ASSUME_RECVMSG_SYSCALL): Likewise.
    	* sysdeps/unix/sysv/linux/powerpc/kernel-features.h
    	(__ASSUME_SENDMSG_SYSCALL): Likewise.
    	(__ASSUME_RECVMSG_SYSCALL): Likewise.
    	* sysdeps/unix/sysv/linux/sh/kernel-features.h
    	(__ASSUME_SENDMSG_SYSCALL): Likewise.
    	(__ASSUME_RECVMSG_SYSCALL): Likewise.

diff --git a/ChangeLog b/ChangeLog
index 2a4cf83..8895413 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,63 @@
+2016-05-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+	* sysdeps/unix/sysv/linux/alpha/syscalls.list (recvmsg): Remove
+	from auto-generation.
+	(sendmsg): Likewise.
+	* sysdeps/unix/sysv/linux/arm/syscalls.list (recvmsg): Likewise.
+	(sendmsg): Likewise.
+	* sysdeps/unix/sysv/linux/generic/syscalls.list (recvmsg): Likewise.
+	(sendmsg): Likewise.
+	* sysdeps/unix/sysv/linux/hppa/syscalls.list (recvmsg): Likewise.
+	(sendmsg): Likewise.
+	* sysdeps/unix/sysv/linux/ia64/syscalls.list (recvmsg): Likewise.
+	(sendmsg): Likewise.
+	* sysdeps/unix/sysv/linux/mips/syscalls.list (recvmsg): Likewise.
+	(sendmsg): Likewise.
+	* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (recvmsg):
+	Likewise.
+	(sendmsg): Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/syscalls.list (recvmsg): Likewise.
+	(sendmsg): Likewise.
+	* sysdeps/unix/sysv/linux/i386/kernel-features.h
+	[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL):
+	Remove.
+	[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL):
+	Likewise.
+	[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_SENDMSG_SYSCALL):
+	Undefine.
+	[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_RECVMSG_SYSCALL):
+	Likewise.
+	* sysdeps/unix/sysv/linux/kernel-features.h
+	(__ASSUME_SENDMSG_SYSCALL): Define.
+	(__ASSUME_RECVMSG_SYSCALL): Likewise.
+	* sysdeps/unix/sysv/linux/m68k/kernel-features.h
+	[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL):
+	Remove.
+	[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL):
+	Likewise.
+	[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_SENDMSG_SYSCALL):
+	Undefine.
+	[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_RECVMSG_SYSCALL):
+	Likewise.
+	* sysdeps/unix/sysv/linux/s390/kernel-features.h
+	[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_SENDMSG_SYSCALL):
+	Remove.
+	[__LINUX_KERNEL_VERSION >= 0x040300] (__ASSUME_RECVMSG_SYSCALL):
+	Likewise.
+	[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_SENDMSG_SYSCALL):
+	Undefine.
+	[__LINUX_KERNEL_VERSION < 0x040300] (__ASSUME_RECVMSG_SYSCALL):
+	Likewise.
+	* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
+	(__ASSUME_SENDMSG_SYSCALL): Undefine.
+	(__ASSUME_RECVMSG_SYSCALL): Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/kernel-features.h
+	(__ASSUME_SENDMSG_SYSCALL): Likewise.
+	(__ASSUME_RECVMSG_SYSCALL): Likewise.
+	* sysdeps/unix/sysv/linux/sh/kernel-features.h
+	(__ASSUME_SENDMSG_SYSCALL): Likewise.
+	(__ASSUME_RECVMSG_SYSCALL): Likewise.
+
 2016-05-25  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
 
 	* stdlib/gen-tst-strtod-round.c: Add backslash to
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index cad1fc3..0c9efcb 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -27,9 +27,7 @@ getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
 listen		-	listen		i:ii	__listen	listen
 recv		-	recv		Ci:ibni	__libc_recv	__recv recv
 recvfrom	-	recvfrom	Ci:ibniBN	__libc_recvfrom	__recvfrom recvfrom
-recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
 send		-	send		Ci:ibni	__libc_send	__send send
-sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
 sendto		-	sendto		Ci:ibnibn	__libc_sendto	__sendto sendto
 setsockopt	-	setsockopt	i:iiibn	__setsockopt	setsockopt
 shutdown	-	shutdown	i:ii	__shutdown	shutdown
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index c06954f..82402b1 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -43,9 +43,7 @@ getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
 listen		-	listen		i:ii	__listen	listen
 recv		-	recv		Ci:ibni	__libc_recv	__recv recv
 recvfrom	-	recvfrom	Ci:ibniBN	__libc_recvfrom	__recvfrom recvfrom
-recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
 send		-	send		Ci:ibni	__libc_send	__send send
-sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
 sendto		-	sendto		Ci:ibnibn	__libc_sendto	__sendto sendto
 setsockopt	-	setsockopt	i:iiibn	__setsockopt	setsockopt
 shutdown	-	shutdown	i:ii	__shutdown	shutdown
diff --git a/sysdeps/unix/sysv/linux/generic/syscalls.list b/sysdeps/unix/sysv/linux/generic/syscalls.list
index 4b2e747..5993ab4 100644
--- a/sysdeps/unix/sysv/linux/generic/syscalls.list
+++ b/sysdeps/unix/sysv/linux/generic/syscalls.list
@@ -28,5 +28,3 @@ recvfrom	-	recvfrom	Ci:ibniBN	__libc_recvfrom	__recvfrom recvfrom
 setsockopt	-	setsockopt	i:iiibn	__setsockopt	setsockopt
 getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
 shutdown	-	shutdown	i:ii	__shutdown	shutdown
-sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
-recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
diff --git a/sysdeps/unix/sysv/linux/hppa/syscalls.list b/sysdeps/unix/sysv/linux/hppa/syscalls.list
index d29c358..1f3dfb0 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscalls.list
+++ b/sysdeps/unix/sysv/linux/hppa/syscalls.list
@@ -24,9 +24,7 @@ getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
 listen		-	listen		i:ii	__listen	listen
 recv		-	recv		Ci:ibni	__libc_recv	__recv recv
 recvfrom	-	recvfrom	Ci:ibniBN	__libc_recvfrom	__recvfrom recvfrom
-recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
 send		-	send		Ci:ibni	__libc_send	__send send
-sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
 sendto		-	sendto		Ci:ibnibn	__libc_sendto	__sendto sendto
 setsockopt	-	setsockopt	i:iiibn	__setsockopt	setsockopt
 shutdown	-	shutdown	i:ii	__shutdown	shutdown
diff --git a/sysdeps/unix/sysv/linux/i386/kernel-features.h b/sysdeps/unix/sysv/linux/i386/kernel-features.h
index 45054f8..148963c 100644
--- a/sysdeps/unix/sysv/linux/i386/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/i386/kernel-features.h
@@ -40,10 +40,8 @@
 # define __ASSUME_GETPEERNAME_SYSCALL        1
 # define __ASSUME_SENDTO_SYSCALL             1
 # define __ASSUME_SENDTO_FOR_SEND_SYSCALL    1
-# define __ASSUME_SENDMSG_SYSCALL            1
 # define __ASSUME_RECVFROM_SYSCALL           1
 # define __ASSUME_RECVFROM_FOR_RECV_SYSCALL  1
-# define __ASSUME_RECVMSG_SYSCALL            1
 # define __ASSUME_SHUTDOWN_SYSCALL           1
 #endif
 
@@ -51,4 +49,6 @@
 
 #if __LINUX_KERNEL_VERSION < 0x040300
 # undef __ASSUME_ACCEPT4_SYSCALL
+# undef __ASSUME_SENDMSG_SYSCALL
+# undef __ASSUME_RECVMSG_SYSCALL
 #endif
diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/sysdeps/unix/sysv/linux/ia64/syscalls.list
index 8642bac..68b6c9a 100644
--- a/sysdeps/unix/sysv/linux/ia64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/ia64/syscalls.list
@@ -28,9 +28,7 @@ getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
 listen		-	listen		i:ii	__listen	listen
 recv		-	recv		Ci:ibni	__libc_recv	__recv recv
 recvfrom	-	recvfrom	Ci:ibniBN	__libc_recvfrom	__recvfrom recvfrom
-recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
 send		-	send		Ci:ibni	__libc_send	__send send
-sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
 sendto		-	sendto		Ci:ibnibn	__libc_sendto	__sendto sendto
 setsockopt	-	setsockopt	i:iiibn	__setsockopt	setsockopt
 shutdown	-	shutdown	i:ii	__shutdown	shutdown
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 5a1b204..02c530b 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -145,3 +145,9 @@
 # define __ASSUME_SENDMMSG_SYSCALL	1
 # define __ASSUME_SENDMMSG	1
 #endif
+
+/* On most architectures, most socket syscalls are supported for all
+   supported kernel versions, but on some socketcall architectures
+   separate syscalls were only added later.  */
+#define __ASSUME_SENDMSG_SYSCALL	1
+#define __ASSUME_RECVMSG_SYSCALL	1
diff --git a/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
index 646bc4b..dec04f0 100644
--- a/sysdeps/unix/sysv/linux/m68k/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/m68k/kernel-features.h
@@ -34,10 +34,8 @@
 # define __ASSUME_GETPEERNAME_SYSCALL        1
 # define __ASSUME_SENDTO_SYSCALL             1
 # define __ASSUME_SENDTO_FOR_SEND_SYSCALL    1
-# define __ASSUME_SENDMSG_SYSCALL            1
 # define __ASSUME_RECVFROM_SYSCALL           1
 # define __ASSUME_RECVFROM_FOR_RECV_SYSCALL  1
-# define __ASSUME_RECVMSG_SYSCALL            1
 # define __ASSUME_SHUTDOWN_SYSCALL           1
 #endif
 
@@ -47,6 +45,8 @@
 # undef __ASSUME_ACCEPT4_SYSCALL
 # undef __ASSUME_RECVMMSG_SYSCALL
 # undef __ASSUME_SENDMMSG_SYSCALL
+# undef __ASSUME_SENDMSG_SYSCALL
+# undef __ASSUME_RECVMSG_SYSCALL
 #endif
 
 /* No support for PI futexes or robust mutexes before 3.10 for m68k.  */
diff --git a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
index a331b9f..6c7875c 100644
--- a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
@@ -35,8 +35,6 @@
 #define __ASSUME_SHUTDOWN_SYSCALL	1
 #define __ASSUME_GETSOCKOPT_SYSCALL	1
 #define __ASSUME_SETSOCKOPT_SYSCALL	1
-#define __ASSUME_SENDMSG_SYSCALL	1
-#define __ASSUME_RECVMSG_SYSCALL	1
 
 /* Support for the accept4 and recvmmsg syscalls was added in 2.6.33.  */
 #define __ASSUME_RECVMMSG_SYSCALL_WITH_SOCKETCALL      1
diff --git a/sysdeps/unix/sysv/linux/mips/syscalls.list b/sysdeps/unix/sysv/linux/mips/syscalls.list
index db731b1..cd946a0 100644
--- a/sysdeps/unix/sysv/linux/mips/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/syscalls.list
@@ -21,9 +21,7 @@ getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
 listen		-	listen		i:ii	__listen	listen
 recv		-	recv		Ci:ibni	__libc_recv	__recv recv
 recvfrom	-	recvfrom	Ci:ibniBN __libc_recvfrom __recvfrom recvfrom
-recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
 send		-	send		Ci:ibni	__libc_send	__send send
-sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
 sendto		-	sendto		Ci:ibnibn __libc_sendto	__sendto sendto
 setsockopt	-	setsockopt	i:iiibn	__setsockopt	setsockopt
 shutdown	-	shutdown	i:ii	__shutdown	shutdown
diff --git a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
index 38bb0bc..996535f 100644
--- a/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/powerpc/kernel-features.h
@@ -36,8 +36,6 @@
 #define __ASSUME_SHUTDOWN_SYSCALL	1
 #define __ASSUME_GETSOCKOPT_SYSCALL	1
 #define __ASSUME_SETSOCKOPT_SYSCALL	1
-#define __ASSUME_SENDMSG_SYSCALL	1
-#define __ASSUME_RECVMSG_SYSCALL	1
 
 /* The sendmmsg syscall was added for PowerPC in 3.0.  */
 #define __ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL	1
diff --git a/sysdeps/unix/sysv/linux/s390/kernel-features.h b/sysdeps/unix/sysv/linux/s390/kernel-features.h
index a6f131b..b3edee4 100644
--- a/sysdeps/unix/sysv/linux/s390/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/s390/kernel-features.h
@@ -34,10 +34,8 @@
 # define __ASSUME_GETPEERNAME_SYSCALL        1
 # define __ASSUME_SENDTO_SYSCALL             1
 # define __ASSUME_SENDTO_FOR_SEND_SYSCALL    1
-# define __ASSUME_SENDMSG_SYSCALL            1
 # define __ASSUME_RECVFROM_SYSCALL           1
 # define __ASSUME_RECVFROM_FOR_RECV_SYSCALL  1
-# define __ASSUME_RECVMSG_SYSCALL            1
 # define __ASSUME_SHUTDOWN_SYSCALL           1
 #endif
 
@@ -47,4 +45,6 @@
 # undef __ASSUME_ACCEPT4_SYSCALL
 # undef __ASSUME_RECVMMSG_SYSCALL
 # undef __ASSUME_SENDMMSG_SYSCALL
+# undef __ASSUME_SENDMSG_SYSCALL
+# undef __ASSUME_RECVMSG_SYSCALL
 #endif
diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h
index 9b4d1c2..ad05fc3 100644
--- a/sysdeps/unix/sysv/linux/sh/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h
@@ -36,8 +36,6 @@
 #define __ASSUME_SHUTDOWN_SYSCALL	1
 #define __ASSUME_GETSOCKOPT_SYSCALL	1
 #define __ASSUME_SETSOCKOPT_SYSCALL	1
-#define __ASSUME_SENDMSG_SYSCALL	1
-#define __ASSUME_RECVMSG_SYSCALL	1
 
 /* The sendmmsg syscall was added for SH in 3.0.  */
 #define __ASSUME_SENDMMSG_SYSCALL_WITH_SOCKETCALL	1
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
index 3d1c1da..eecd837 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
@@ -11,9 +11,7 @@ getsockopt	-	getsockopt	5	__getsockopt	getsockopt
 listen		-	listen		2	__listen	listen
 recv		-	recv		C:4	__libc_recv	__recv recv
 recvfrom	-	recvfrom	C:6	__libc_recvfrom	__recvfrom recvfrom
-recvmsg		-	recvmsg		C:3	__libc_recvmsg	__recvmsg recvmsg
 send		-	send		C:4	__libc_send	__send send
-sendmsg		-	sendmsg		C:3	__libc_sendmsg	__sendmsg sendmsg
 sendto		-	sendto		C:6	__libc_sendto	__sendto sendto
 setsockopt	-	setsockopt	5	__setsockopt	setsockopt
 shutdown	-	shutdown	2	__shutdown	shutdown
diff --git a/sysdeps/unix/sysv/linux/x86_64/syscalls.list b/sysdeps/unix/sysv/linux/x86_64/syscalls.list
index 2e4135f..d09d101 100644
--- a/sysdeps/unix/sysv/linux/x86_64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/x86_64/syscalls.list
@@ -26,8 +26,6 @@ getsockname	-	getsockname	i:ipp	__getsockname	getsockname
 getsockopt	-	getsockopt	i:iiiBN	__getsockopt	getsockopt
 listen		-	listen		i:ii	__listen	listen
 recvfrom	-	recvfrom	Ci:ibniBN	__libc_recvfrom	__recvfrom recvfrom
-recvmsg		-	recvmsg		Ci:ipi	__libc_recvmsg	__recvmsg recvmsg
-sendmsg		-	sendmsg		Ci:ipi	__libc_sendmsg	__sendmsg sendmsg
 sendto		-	sendto		Ci:ibnibn	__libc_sendto	__sendto sendto
 setsockopt	-	setsockopt	i:iiibn	__setsockopt	setsockopt
 shutdown	-	shutdown	i:ii	__shutdown	shutdown

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |  187 ++++++++++++++++++++
 conform/data/sys/socket.h-data                     |    8 +-
 nptl/Makefile                                      |    9 +-
 sysdeps/unix/sysv/linux/Makefile                   |    7 +-
 sysdeps/unix/sysv/linux/aarch64/Versions           |    4 +
 sysdeps/unix/sysv/linux/aarch64/libc.abilist       |    5 +
 sysdeps/unix/sysv/linux/alpha/Versions             |    3 +
 sysdeps/unix/sysv/linux/alpha/libc.abilist         |    5 +
 sysdeps/unix/sysv/linux/alpha/syscalls.list        |    2 -
 sysdeps/unix/sysv/linux/arm/Versions               |    3 +
 sysdeps/unix/sysv/linux/arm/libc.abilist           |    3 +
 sysdeps/unix/sysv/linux/arm/syscalls.list          |    2 -
 sysdeps/unix/sysv/linux/bits/socket.h              |   49 ++++-
 sysdeps/unix/sysv/linux/check_native.c             |   11 +-
 sysdeps/unix/sysv/linux/check_pf.c                 |   11 +-
 sysdeps/unix/sysv/linux/generic/syscalls.list      |    2 -
 sysdeps/unix/sysv/linux/hppa/Versions              |    3 +
 sysdeps/unix/sysv/linux/hppa/libc.abilist          |    3 +
 sysdeps/unix/sysv/linux/hppa/syscalls.list         |    2 -
 sysdeps/unix/sysv/linux/i386/Versions              |    3 +
 sysdeps/unix/sysv/linux/i386/kernel-features.h     |    4 +-
 sysdeps/unix/sysv/linux/i386/libc.abilist          |    3 +
 sysdeps/unix/sysv/linux/ia64/Versions              |    3 +
 sysdeps/unix/sysv/linux/ia64/libc.abilist          |    5 +
 sysdeps/unix/sysv/linux/ia64/syscalls.list         |    2 -
 sysdeps/unix/sysv/linux/ifaddrs.c                  |   11 +-
 sysdeps/unix/sysv/linux/kernel-features.h          |    6 +
 sysdeps/unix/sysv/linux/m68k/Versions              |    3 +
 sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist |    3 +
 sysdeps/unix/sysv/linux/m68k/kernel-features.h     |    4 +-
 sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist   |    3 +
 sysdeps/unix/sysv/linux/microblaze/Versions        |    3 +
 .../unix/sysv/linux/microblaze/kernel-features.h   |    2 -
 sysdeps/unix/sysv/linux/microblaze/libc.abilist    |    3 +
 sysdeps/unix/sysv/linux/mips/mips32/Versions       |    3 +
 .../unix/sysv/linux/mips/mips32/fpu/libc.abilist   |    3 +
 .../unix/sysv/linux/mips/mips32/nofpu/libc.abilist |    3 +
 sysdeps/unix/sysv/linux/mips/mips64/n32/Versions   |    3 +
 .../unix/sysv/linux/mips/mips64/n32/libc.abilist   |    3 +
 sysdeps/unix/sysv/linux/mips/mips64/n64/Versions   |    5 +
 .../unix/sysv/linux/mips/mips64/n64/libc.abilist   |    5 +
 sysdeps/unix/sysv/linux/mips/syscalls.list         |    2 -
 sysdeps/unix/sysv/linux/nios2/Versions             |    3 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist         |    3 +
 sysdeps/unix/sysv/linux/oldrecvmmsg.c              |   87 +++++++++
 sysdeps/unix/sysv/linux/oldrecvmsg.c               |   40 ++++
 sysdeps/unix/sysv/linux/oldsendmmsg.c              |   76 ++++++++
 sysdeps/unix/sysv/linux/oldsendmsg.c               |   40 ++++
 sysdeps/unix/sysv/linux/powerpc/Versions           |    3 +
 sysdeps/unix/sysv/linux/powerpc/kernel-features.h  |    2 -
 .../sysv/linux/powerpc/powerpc32/fpu/libc.abilist  |    3 +
 .../linux/powerpc/powerpc32/nofpu/libc.abilist     |    3 +
 sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions |    3 +
 .../sysv/linux/powerpc/powerpc64/libc-le.abilist   |    5 +
 .../unix/sysv/linux/powerpc/powerpc64/libc.abilist |    5 +
 sysdeps/unix/sysv/linux/recvmmsg.c                 |   61 ++++---
 sysdeps/unix/sysv/linux/recvmsg.c                  |   36 +++-
 sysdeps/unix/sysv/linux/s390/kernel-features.h     |    4 +-
 sysdeps/unix/sysv/linux/s390/s390-32/Versions      |    3 +
 sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist  |    3 +
 sysdeps/unix/sysv/linux/s390/s390-64/Versions      |    3 +
 sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist  |    5 +
 sysdeps/unix/sysv/linux/sendmmsg.c                 |   72 ++++++---
 sysdeps/unix/sysv/linux/sendmsg.c                  |   23 ++-
 sysdeps/unix/sysv/linux/sh/Versions                |    3 +
 sysdeps/unix/sysv/linux/sh/kernel-features.h       |    2 -
 sysdeps/unix/sysv/linux/sh/libc.abilist            |    3 +
 sysdeps/unix/sysv/linux/sparc/Versions             |    3 +
 sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist |    3 +
 sysdeps/unix/sysv/linux/sparc/sparc64/Versions     |    3 +
 sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist |    5 +
 .../unix/sysv/linux/sparc/sparc64/syscalls.list    |    2 -
 sysdeps/unix/sysv/linux/tile/Versions              |    3 +
 .../sysv/linux/tile/tilegx/tilegx32/libc.abilist   |    3 +
 .../unix/sysv/linux/tile/tilegx/tilegx64/Versions  |    5 +
 .../sysv/linux/tile/tilegx/tilegx64/libc.abilist   |    5 +
 sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist  |    3 +
 sysdeps/unix/sysv/linux/x86_64/64/Versions         |    5 +
 sysdeps/unix/sysv/linux/x86_64/64/libc.abilist     |    5 +
 sysdeps/unix/sysv/linux/x86_64/Versions            |    3 +
 sysdeps/unix/sysv/linux/x86_64/syscalls.list       |    2 -
 sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist    |    3 +
 82 files changed, 831 insertions(+), 117 deletions(-)
 create mode 100644 sysdeps/unix/sysv/linux/mips/mips64/n64/Versions
 create mode 100644 sysdeps/unix/sysv/linux/oldrecvmmsg.c
 create mode 100644 sysdeps/unix/sysv/linux/oldrecvmsg.c
 create mode 100644 sysdeps/unix/sysv/linux/oldsendmmsg.c
 create mode 100644 sysdeps/unix/sysv/linux/oldsendmsg.c
 create mode 100644 sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/Versions
 create mode 100644 sysdeps/unix/sysv/linux/x86_64/64/Versions


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]