summaryrefslogtreecommitdiff
path: root/lib/getaddrinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/getaddrinfo.c')
-rw-r--r--lib/getaddrinfo.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/getaddrinfo.c b/lib/getaddrinfo.c
index a0b638b..ec24e38 100644
--- a/lib/getaddrinfo.c
+++ b/lib/getaddrinfo.c
@@ -54,7 +54,7 @@
# define PF_UNSPEC 0
#endif
-#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+#if defined _WIN32 && !defined __CYGWIN__
# define WINDOWS_NATIVE
#endif
@@ -62,6 +62,11 @@
#include "sockets.h"
#ifdef WINDOWS_NATIVE
+
+/* Avoid warnings from gcc -Wcast-function-type. */
+# define GetProcAddress \
+ (void *) GetProcAddress
+
typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*,
const struct addrinfo*,
struct addrinfo**);