Fix GDB compilation on MinGW (PR gdb/24292)
gdb/ChangeLog: 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.
This commit is contained in:
parent
ca5a17b09e
commit
41fa577fbc
6 changed files with 39 additions and 10 deletions
|
@ -1,3 +1,17 @@
|
||||||
|
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>
|
2019-03-01 Gary Benson <gbenson@redhat.com>
|
||||||
|
|
||||||
* coffread.c (coff_start_symtab): Remove unnecessary xstrdup.
|
* coffread.c (coff_start_symtab): Remove unnecessary xstrdup.
|
||||||
|
|
|
@ -21,8 +21,11 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#ifdef USE_WIN32API
|
#ifdef USE_WIN32API
|
||||||
#include <winsock2.h>
|
#if _WIN32_WINNT < 0x0501
|
||||||
#include <wspiapi.h>
|
# undef _WIN32_WINNT
|
||||||
|
# define _WIN32_WINNT 0x0501
|
||||||
|
#endif
|
||||||
|
#include <ws2tcpip.h>
|
||||||
#else
|
#else
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
|
@ -45,8 +45,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if USE_WIN32API
|
#if USE_WIN32API
|
||||||
#include <winsock2.h>
|
#if _WIN32_WINNT < 0x0501
|
||||||
#include <wspiapi.h>
|
# undef _WIN32_WINNT
|
||||||
|
# define _WIN32_WINNT 0x0501
|
||||||
|
#endif
|
||||||
|
#include <ws2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "common/netstuff.h"
|
#include "common/netstuff.h"
|
||||||
|
|
|
@ -63,8 +63,11 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#if USE_WIN32API
|
#if USE_WIN32API
|
||||||
#include <winsock2.h>
|
#if _WIN32_WINNT < 0x0501
|
||||||
#include <wspiapi.h>
|
# undef _WIN32_WINNT
|
||||||
|
# define _WIN32_WINNT 0x0501
|
||||||
|
#endif
|
||||||
|
#include <ws2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __QNX__
|
#if __QNX__
|
||||||
|
|
|
@ -39,8 +39,11 @@
|
||||||
#include "common/gdb_sys_time.h"
|
#include "common/gdb_sys_time.h"
|
||||||
|
|
||||||
#ifdef USE_WIN32API
|
#ifdef USE_WIN32API
|
||||||
#include <winsock2.h>
|
#if _WIN32_WINNT < 0x0501
|
||||||
#include <wspiapi.h>
|
# undef _WIN32_WINNT
|
||||||
|
# define _WIN32_WINNT 0x0501
|
||||||
|
#endif
|
||||||
|
#include <ws2tcpip.h>
|
||||||
#ifndef ETIMEDOUT
|
#ifndef ETIMEDOUT
|
||||||
#define ETIMEDOUT WSAETIMEDOUT
|
#define ETIMEDOUT WSAETIMEDOUT
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,8 +22,11 @@
|
||||||
#include "common/netstuff.h"
|
#include "common/netstuff.h"
|
||||||
#include "diagnostics.h"
|
#include "diagnostics.h"
|
||||||
#ifdef USE_WIN32API
|
#ifdef USE_WIN32API
|
||||||
#include <winsock2.h>
|
#if _WIN32_WINNT < 0x0501
|
||||||
#include <wspiapi.h>
|
# undef _WIN32_WINNT
|
||||||
|
# define _WIN32_WINNT 0x0501
|
||||||
|
#endif
|
||||||
|
#include <ws2tcpip.h>
|
||||||
#else
|
#else
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue