Skip to content

Commit d0522ec

Browse files
committed
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
1 parent d8a2992 commit d0522ec

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

src/net.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,6 @@ static constexpr int DUMP_PEERS_INTERVAL = 15 * 60;
5858
#define MSG_DONTWAIT 0
5959
#endif
6060

61-
// Fix for ancient MinGW versions, that don't have defined these in ws2tcpip.h.
62-
// Todo: Can be removed when our pull-tester is upgraded to a modern MinGW version.
63-
#ifdef WIN32
64-
#ifndef PROTECTION_LEVEL_UNRESTRICTED
65-
#define PROTECTION_LEVEL_UNRESTRICTED 10
66-
#endif
67-
#ifndef IPV6_PROTECTION_LEVEL
68-
#define IPV6_PROTECTION_LEVEL 23
69-
#endif
70-
#endif
71-
7261
/** Used to pass flags to the Bind() function */
7362
enum BindFlags {
7463
BF_NONE = 0,

src/netbase.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,7 @@ bool static LookupIntern(const char *pszName, std::vector<CNetAddr>& vIP, unsign
8080
aiHint.ai_socktype = SOCK_STREAM;
8181
aiHint.ai_protocol = IPPROTO_TCP;
8282
aiHint.ai_family = AF_UNSPEC;
83-
#ifdef WIN32
84-
aiHint.ai_flags = fAllowLookup ? 0 : AI_NUMERICHOST;
85-
#else
8683
aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST;
87-
#endif
8884
struct addrinfo *aiRes = nullptr;
8985
int nErr = getaddrinfo(pszName, nullptr, &aiHint, &aiRes);
9086
if (nErr)

0 commit comments

Comments
 (0)