aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2012-11-03 18:29:46 +0100
committerThomas Schwinge <thomas@codesourcery.com>2012-11-20 19:26:04 +0100
commit123be9deda8eb24ef15fb889248984e6d23bb8b4 (patch)
tree8d875402831e2eb1923b9d3ef8d88bcee14ad2c6 /sysdeps/unix/sysv/linux/sendmmsg.c
parentFix set-but-not-used warnings in ldbl-128 nearbyintl, rintl. (diff)
downloadglibc-123be9deda8eb24ef15fb889248984e6d23bb8b4.tar.gz
glibc-123be9deda8eb24ef15fb889248984e6d23bb8b4.tar.bz2
glibc-123be9deda8eb24ef15fb889248984e6d23bb8b4.zip
Add recvmmsg and sendmmsg to the generic glibc API.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sendmmsg.c')
-rw-r--r--sysdeps/unix/sysv/linux/sendmmsg.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/sysdeps/unix/sysv/linux/sendmmsg.c b/sysdeps/unix/sysv/linux/sendmmsg.c
index 0674419206..a6daff1728 100644
--- a/sysdeps/unix/sysv/linux/sendmmsg.c
+++ b/sysdeps/unix/sysv/linux/sendmmsg.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
@@ -26,7 +26,7 @@
#ifdef __NR_sendmmsg
int
-sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
+__sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
{
if (SINGLE_THREAD_P)
return INLINE_SYSCALL (sendmmsg, 4, fd, vmessages, vlen, flags);
@@ -39,6 +39,8 @@ sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
return result;
}
+libc_hidden_def (__sendmmsg)
+weak_alias (__sendmmsg, sendmmsg)
#elif defined __NR_socketcall
# ifndef __ASSUME_SENDMMSG
extern int __internal_sendmmsg (int fd, struct mmsghdr *vmessages,
@@ -48,7 +50,7 @@ extern int __internal_sendmmsg (int fd, struct mmsghdr *vmessages,
static int have_sendmmsg;
int
-sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
+__sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
{
if (__builtin_expect (have_sendmmsg >= 0, 1))
{
@@ -81,15 +83,11 @@ sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
__set_errno (ENOSYS);
return -1;
}
+libc_hidden_def (__sendmmsg)
+weak_alias (__sendmmsg, sendmmsg)
# else
/* When __ASSUME_SENDMMSG sendmmsg is defined in internal_sendmmsg.S. */
# endif
#else
-int
-sendmmsg (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags)
-{
- __set_errno (ENOSYS);
- return -1;
-}
-stub_warning (sendmmsg)
+# include <socket/sendmmsg.c>
#endif