mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
Merge #20221: net: compat.h related cleanup
cadb77a6ab
net: Add compat.h header for htonl function (Hennadii Stepanov)f796f0057b
net: Drop unneeded headers when compat.h included (Hennadii Stepanov)467c346448
net: Drop unneeded Windows headers in compat.h (Hennadii Stepanov) Pull request description: It is the `compat.h` header's job to provide platform-agnostic interfaces for internet operations. No need in `#include <arpa/inet.h>` scattered around. ACKs for top commit: practicalswift: re-ACKcadb77a6ab
: patch looks even better laanwj: Code review ACKcadb77a6ab
Tree-SHA512: 625ff90b2806310ab856a6ca1ddb6d9a85aa70f342b323e8525a711dd12219a1ecec8373ec1dca5a0653ffb11f9b421753887b25615d991ba3132c1cca6a3c6e
This commit is contained in:
commit
a0489f3472
@ -18,11 +18,7 @@
|
||||
#undef FD_SETSIZE // prevent redefinition compiler warning
|
||||
#endif
|
||||
#define FD_SETSIZE 1024 // max number of fds in fd_set
|
||||
|
||||
#include <winsock2.h> // Must be included before mswsock.h and windows.h
|
||||
|
||||
#include <mswsock.h>
|
||||
#include <windows.h>
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <stdint.h>
|
||||
#else
|
||||
|
@ -33,13 +33,6 @@
|
||||
|
||||
#include <support/events.h>
|
||||
|
||||
#ifdef EVENT__HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#ifdef _XOPEN_SOURCE_EXTENDED
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/** Maximum size of http request (request line + headers) */
|
||||
static const size_t MAX_HEADERS_SIZE = 8192;
|
||||
|
||||
|
@ -33,11 +33,6 @@
|
||||
#include <memory>
|
||||
#include <condition_variable>
|
||||
|
||||
#ifndef WIN32
|
||||
#include <arpa/inet.h>
|
||||
#endif
|
||||
|
||||
|
||||
class CScheduler;
|
||||
class CNode;
|
||||
class BanMan;
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include <chainparams.h>
|
||||
#include <chainparamsbase.h>
|
||||
#include <compat.h>
|
||||
#include <crypto/hmac_sha256.h>
|
||||
#include <net.h>
|
||||
#include <netaddress.h>
|
||||
|
Loading…
Reference in New Issue
Block a user