diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-07-05 10:21:58 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-07-05 13:28:19 +0200 |
commit | 21e0705734b90170bfb9dcdc642a9c0743e2a1b1 (patch) | |
tree | e97efc8502b8302461b3ea91da5a6ebd61b02b28 | |
parent | da08c867e4974af19c253678f439c5e5c5e29e92 (diff) |
inet_pton: fix include on windows to get prototype
inet_pton() exists on Windows and gets used by our cmake builds. Make
sure the correct header file is included to avoid compiler warnings.
Closes #1639
-rw-r--r-- | lib/inet_pton.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/inet_pton.h b/lib/inet_pton.h index 9188d9598..e216f4efa 100644 --- a/lib/inet_pton.h +++ b/lib/inet_pton.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2017, 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 @@ -29,6 +29,9 @@ int Curl_inet_pton(int, const char *, void *); #ifdef HAVE_INET_PTON #ifdef HAVE_ARPA_INET_H #include <arpa/inet.h> +#elif defined(HAVE_WS2TCPIP_H) +/* inet_pton() exists in Vista or later */ +#include <ws2tcpip.h> #endif #define Curl_inet_pton(x,y,z) inet_pton(x,y,z) #endif |