Fix ntbtls-cli.c for Windows.
authorNIIBE Yutaka <gniibe@fsij.org>
Fri, 20 Jan 2017 03:28:35 +0000 (12:28 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Fri, 20 Jan 2017 03:28:35 +0000 (12:28 +0900)
* src/ntbtls-cli.c: Include files fix.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
src/ntbtls-cli.c

index 46264cf..29b2784 100644 (file)
 
 #include <unistd.h>
 #include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <netdb.h>
+#ifdef HAVE_W32_SYSTEM
+# define WIN32_LEAN_AND_MEAN
+# ifdef HAVE_WINSOCK2_H
+#  include <winsock2.h>
+# endif
+# include <windows.h>
+#else
+# include <sys/socket.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
+# include <netdb.h>
+#endif
 
 #include "ntbtls.h"