1 #include <sys/socket.h>
8 ssize_t sendmsg(int fd, const struct msghdr *msg, int flags)
10 #if LONG_MAX > INT_MAX
12 struct cmsghdr chbuf[1024/sizeof(struct cmsghdr)+1], *c;
15 h.__pad1 = h.__pad2 = 0;
17 if (h.msg_controllen) {
18 if (h.msg_controllen > 1024) {
22 memcpy(chbuf, h.msg_control, h.msg_controllen);
23 h.msg_control = chbuf;
24 for (c=CMSG_FIRSTHDR(&h); c; c=CMSG_NXTHDR(&h,c))
29 return socketcall_cp(sendmsg, fd, msg, flags, 0, 0, 0);