]> granicus.if.org Git - curl/commitdiff
curl_addrinfo.c: Allow Unix Domain Sockets to compile under Windows
authorSteve Holme <steve_holme@hotmail.com>
Wed, 7 Feb 2018 21:33:57 +0000 (21:33 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Wed, 7 Feb 2018 21:33:57 +0000 (21:33 +0000)
Windows 10.0.17061 SDK introduces support for Unix Domain Sockets.
Added the necessary include file to curl_addrinfo.c.

Note: The SDK (which is considered beta) has to be installed, VS 2017
project file has to be re-targeted for Windows 10.0.17061 and #define
enabled in config-win32.h.

lib/config-win32.h
lib/curl_addrinfo.c

index 3e5567df2bbb0dec63c309b278f30fab110e75c4..fdac6f9a2c2efb77d0c3a98c065773dc6622afcd 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -708,6 +708,11 @@ Vista
 /* Define to use the Windows crypto library. */
 #define USE_WIN32_CRYPTO
 
+/* Define to use Unix sockets. */
+#if defined(_MSC_VER) && _MSC_VER >= 1900
+/* #define USE_UNIX_SOCKETS */
+#endif
+
 /* ---------------------------------------------------------------- */
 /*                       ADDITIONAL DEFINITIONS                     */
 /* ---------------------------------------------------------------- */
index ec76f754054d3c6221c6a87e9ecca884a6b99fe1..95a3f1050c742953d33aa8ee5451a4e5282fe532 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 #  define in_addr_t unsigned long
 #endif
 
+#if defined(WIN32) && defined(USE_UNIX_SOCKETS)
+#include <afunix.h>
+#endif
+
 #include <stddef.h>
 
 #include "curl_addrinfo.h"