+2019-03-02 Eli Zaretskii <eliz@gnu.org>
+
+ PR gdb/24292
+ * common/netstuff.c:
+ * gdbserver/gdbreplay.c
+ * gdbserver/remote-utils.c:
+ * ser-tcp.c:
+ * unittests/parse-connection-spec-selftests.c [USE_WIN32API]:
+ Include ws2tcpip.h instead of wsiapi.h and winsock2.h. Redefine
+ _WIN32_WINNT to 0x0501 if defined to a smaller value, as
+ 'getaddrinfo' and 'freeaddrinfo' were not available before
+ Windows XP, and mingw.org's MinGW headers by default define
+ _WIN32_WINNT to 0x500.
+
2019-03-01 Gary Benson <gbenson@redhat.com>
* coffread.c (coff_start_symtab): Remove unnecessary xstrdup.
#include "common/gdb_sys_time.h"
#ifdef USE_WIN32API
-#include <winsock2.h>
-#include <wspiapi.h>
+#if _WIN32_WINNT < 0x0501
+# undef _WIN32_WINNT
+# define _WIN32_WINNT 0x0501
+#endif
+#include <ws2tcpip.h>
#ifndef ETIMEDOUT
#define ETIMEDOUT WSAETIMEDOUT
#endif