From: Alin Serdean Date: Thu, 13 Jul 2017 20:54:08 +0000 (+0000) Subject: socket-util: Avoid using sendmsg on Windows X-Git-Tag: v2.12.3~3049 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=7f918dca843a7e20524c178ea72f2ddbc493aa63;p=mirror_ovs.git socket-util: Avoid using sendmsg on Windows Sendmsg is not used under Windows. While it does have a sort of equivalent called `WSASendMsg` (https://msdn.microsoft.com/en-us/library/windows/desktop/ms741692(v=vs.85).aspx) it uses a different structure `WSAMSG` instead of the normal msghdr which in turn will have to be mapped properly (this goes further to iovec/wsabuf in the structure itself). Fixes broken build on Windows. Signed-off-by: Alin Gabriel Serdean Signed-off-by: Ben Pfaff Acked-by: Shashank Ram --- diff --git a/lib/socket-util.c b/lib/socket-util.c index 7148ae3da..de7df6745 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -1021,6 +1021,7 @@ sock_strerror(int error) #endif } +#ifndef _WIN32 //Avoid using sendmsg on Windows entirely static int emulate_sendmmsg(int fd, struct mmsghdr *msgs, unsigned int n, unsigned int flags) @@ -1058,3 +1059,4 @@ wrap_sendmmsg(int fd, struct mmsghdr *msgs, unsigned int n, unsigned int flags) return emulate_sendmmsg(fd, msgs, n, flags); } #endif +#endif