[PATCH] dtls: Fix WIN32 build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux