mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
Drop defunct Windows compat fixes
"The AI_ADDRCONFIG flag is defined on the Windows SDK for Windows Vista and later. The AI_ADDRCONFIG flag is supported on Windows Vista and later." https://docs.microsoft.com/en-us/windows/desktop/api/ws2tcpip/nf-ws2tcpip-getaddrinfo However, the version of MinGW we use on Travis is not current and does not carry the relevant definition, as such I defined it in compat. https://github.com/wine-mirror/wine/blob/master/include/ws2tcpip.h Testing confirms that the PROTECTION_LEVEL_UNRESTRICTED, IPV6_PROTECTION_LEVEL, PROCESS_DEP_ENABLE, AI_ADDRCONFIG, are now supported by the version of Windows that we test against, so can be removed. https://travis-ci.org/bitcoin/bitcoin/jobs/483255439 https://travis-ci.org/Empact/bitcoin/jobs/484123087
This commit is contained in:
11
src/net.cpp
11
src/net.cpp
@@ -58,17 +58,6 @@ static constexpr int DUMP_PEERS_INTERVAL = 15 * 60;
|
|||||||
#define MSG_DONTWAIT 0
|
#define MSG_DONTWAIT 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Fix for ancient MinGW versions, that don't have defined these in ws2tcpip.h.
|
|
||||||
// Todo: Can be removed when our pull-tester is upgraded to a modern MinGW version.
|
|
||||||
#ifdef WIN32
|
|
||||||
#ifndef PROTECTION_LEVEL_UNRESTRICTED
|
|
||||||
#define PROTECTION_LEVEL_UNRESTRICTED 10
|
|
||||||
#endif
|
|
||||||
#ifndef IPV6_PROTECTION_LEVEL
|
|
||||||
#define IPV6_PROTECTION_LEVEL 23
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** Used to pass flags to the Bind() function */
|
/** Used to pass flags to the Bind() function */
|
||||||
enum BindFlags {
|
enum BindFlags {
|
||||||
BF_NONE = 0,
|
BF_NONE = 0,
|
||||||
|
|||||||
@@ -80,11 +80,7 @@ bool static LookupIntern(const char *pszName, std::vector<CNetAddr>& vIP, unsign
|
|||||||
aiHint.ai_socktype = SOCK_STREAM;
|
aiHint.ai_socktype = SOCK_STREAM;
|
||||||
aiHint.ai_protocol = IPPROTO_TCP;
|
aiHint.ai_protocol = IPPROTO_TCP;
|
||||||
aiHint.ai_family = AF_UNSPEC;
|
aiHint.ai_family = AF_UNSPEC;
|
||||||
#ifdef WIN32
|
|
||||||
aiHint.ai_flags = fAllowLookup ? 0 : AI_NUMERICHOST;
|
|
||||||
#else
|
|
||||||
aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST;
|
aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST;
|
||||||
#endif
|
|
||||||
struct addrinfo *aiRes = nullptr;
|
struct addrinfo *aiRes = nullptr;
|
||||||
int nErr = getaddrinfo(pszName, nullptr, &aiHint, &aiRes);
|
int nErr = getaddrinfo(pszName, nullptr, &aiHint, &aiRes);
|
||||||
if (nErr)
|
if (nErr)
|
||||||
|
|||||||
Reference in New Issue
Block a user