2011-02-12 00:22:29 -05:00
|
|
|
#include <sys/socket.h>
|
2011-04-08 09:24:19 -04:00
|
|
|
#include <limits.h>
|
2011-02-12 00:22:29 -05:00
|
|
|
#include "syscall.h"
|
|
|
|
#include "libc.h"
|
|
|
|
|
|
|
|
ssize_t sendmsg(int fd, const struct msghdr *msg, int flags)
|
|
|
|
{
|
|
|
|
ssize_t r;
|
2011-04-08 09:24:19 -04:00
|
|
|
#if LONG_MAX > INT_MAX
|
|
|
|
struct msghdr h;
|
|
|
|
if (msg) {
|
|
|
|
h = *msg;
|
|
|
|
h.__pad1 = h.__pad2 = 0;
|
|
|
|
msg = &h;
|
|
|
|
}
|
|
|
|
#endif
|
2011-02-12 00:22:29 -05:00
|
|
|
CANCELPT_BEGIN;
|
2011-02-15 04:40:40 -05:00
|
|
|
r = socketcall(sendmsg, fd, msg, flags, 0, 0, 0);
|
2011-02-12 00:22:29 -05:00
|
|
|
CANCELPT_END;
|
|
|
|
return r;
|
|
|
|
}
|