[vlc-devel] [PATCH 2/2] compat/recvmsg: blind add support for MSG_TRUNC

Ilkka Ollakka ileoo at videolan.org
Fri Oct 26 18:15:11 CEST 2018


Added support to signal MSG_TRUNC on win32 compatibility call for
recvmsg.
---
 compat/recvmsg.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/compat/recvmsg.c b/compat/recvmsg.c
index 1c348fcee2..3f200745e0 100644
--- a/compat/recvmsg.c
+++ b/compat/recvmsg.c
@@ -79,6 +79,12 @@ ssize_t recvmsg(int fd, struct msghdr *msg, int flags)
         case WSAEWOULDBLOCK:
             errno = EAGAIN;
             break;
+#ifdef MSG_TRUNC
+        case WSAEMSGSIZE:
+            msg->msg_flags |= MSG_TRUNC;
+            return rcvd;
+            break;
+#endif
     }
     return -1;
 }
-- 
2.19.1



More information about the vlc-devel mailing list