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.
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}
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
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 \
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
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)
}
}
libc {
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
+
GLIBC_PRIVATE {
__vdso_clock_gettime;
__vdso_clock_getres;
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
#errlist-compat 140
_sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
GLIBC_PRIVATE {
__libc_alpha_cache_shape;
}
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
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;
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
#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
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. */
};
/* 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
{
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));
{
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));
GLIBC_2.19 {
fanotify_mark;
}
+ GLIBC_2.24 {
+ recvms; sendmsg;
+ }
}
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
# f*
fallocate64;
}
+ GLIBC_2.24 {
+ recvms; sendmsg;
+ }
GLIBC_PRIVATE {
__modify_ldt;
}
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
GLIBC_2.2.6 {
getunwind;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
}
libpthread {
GLIBC_2.3.3 {
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
{
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));
GLIBC_2.12 {
__m68k_read_tp;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
GLIBC_PRIVATE {
__vdso_atomic_cmpxchg_32; __vdso_atomic_barrier;
}
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
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
GLIBC_2.18 {
fallocate64;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
}
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
getrlimit64;
setrlimit64;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
}
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
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
getrlimit64;
setrlimit64;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
}
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
--- /dev/null
+libc {
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
+}
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
_flush_cache;
cacheflush;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
}
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
--- /dev/null
+/* 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/socket.h>
+#include <sysdep-cancel.h>
+#include <socketcall.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
+__old_recvmsg (int fd, struct msghdr *msg, int flags)
+{
+# ifdef __ASSUME_RECVMSG_SYSCALL
+ return SYSCALL_CANCEL (recvmsg, fd, msg, flags);
+# else
+ return SOCKETCALL_CANCEL (recvmsg, fd, msg, flags);
+# endif
+}
+compat_symbol (MODULE_NAME, __old_recvmsg, recvmsg, GLIBC_2_0);
+#endif
--- /dev/null
+/* 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/socket.h>
+#include <sysdep-cancel.h>
+#include <socketcall.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
+__old_sendmsg (int fd, const struct msghdr *msg, int flags)
+{
+# ifdef __ASSUME_SENDMSG_SYSCALL
+ return SYSCALL_CANCEL (sendmsg, fd, msg, flags);
+# else
+ return SOCKETCALL_CANCEL (sendmsg, fd, msg, flags);
+# endif
+}
+compat_symbol (MODULE_NAME, __old_sendmsg, sendmsg, GLIBC_2_0);
+#endif
}
}
libc {
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
GLIBC_PRIVATE {
__vdso_get_tbfreq;
__vdso_clock_gettime;
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
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
GLIBC_2.17 {
__ppc_get_timebase_freq;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
}
librt {
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.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
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);
GLIBC_2.11 {
fallocate64;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
}
libutil {
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
__register_frame; __register_frame_table; __deregister_frame;
__frame_state_for; __register_frame_info_table;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
}
librt {
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
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);
GLIBC_2.16 {
fanotify_mark;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
}
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
__getshmlba;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
}
libpthread {
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
# w*
wordexp;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
}
librt {
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
fallocate64;
set_dataplane;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
GLIBC_PRIVATE {
__syscall_error;
__vdso_clock_gettime;
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
--- /dev/null
+libc {
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
+}
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.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
--- /dev/null
+libc {
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
+}
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
modify_ldt;
}
+ GLIBC_2.24 {
+ recvmsg; sendmsg;
+ }
}
librt {
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