[PATCH] dtls: Fix WIN32 build

Kevin Cernekee cernekee at gmail.com
Fri May 6 11:37:11 PDT 2016


mingw32 does not have <netinet/in.h> or <sys/socket.h> headers.

Signed-off-by: Kevin Cernekee <cernekee at gmail.com>
---


Patch is untested.  I tried to use the gitlab shared runners to verify
the mingw32 build, but it looks like they are not set up for this.  If
something else is still broken on WIN32 I'll need to set up a VM
locally.


 dtls.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dtls.c b/dtls.c
index cc56067e3ffe..e196bf852b3a 100644
--- a/dtls.c
+++ b/dtls.c
@@ -18,8 +18,6 @@
 #include <config.h>
 
 #include <errno.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
 #include <sys/types.h>
 #include <unistd.h>
 #include <fcntl.h>
@@ -27,6 +25,10 @@
 #include <errno.h>
 #include <stdlib.h>
 #include <stdio.h>
+#ifndef _WIN32
+#include <netinet/in.h>
+#include <sys/socket.h>
+#endif
 
 #include "openconnect-internal.h"
 
-- 
2.8.1




More information about the openconnect-devel mailing list