diff options
author | Vasil Dimov <vd@FreeBSD.org> | 2021-02-12 15:56:15 +0100 |
---|---|---|
committer | Vasil Dimov <vd@FreeBSD.org> | 2021-03-01 13:22:17 +0100 |
commit | 78fdfbea666201b25919dd67454eb04d6a34326f (patch) | |
tree | 95fd390aa3d5666b17e7895c8a7f0b5d0bc138d8 /src/net.cpp | |
parent | 34bcfab562bac9887ca9c3831cf4fd0ee7f98149 (diff) | |
download | bitcoin-78fdfbea666201b25919dd67454eb04d6a34326f.tar.xz |
net: dedup MSG_NOSIGNAL and MSG_DONTWAIT definitions
Deduplicate `MSG_NOSIGNAL` and `MSG_DONTWAIT` definitions from `net.cpp`
and `netbase.cpp` to `compat.h` where they can also be reused by other
code.
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/net.cpp b/src/net.cpp index d03e3cac37..89f7ef0f06 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -11,6 +11,7 @@ #include <banman.h> #include <clientversion.h> +#include <compat.h> #include <consensus/consensus.h> #include <crypto/sha256.h> #include <net_permissions.h> @@ -72,16 +73,6 @@ static constexpr std::chrono::seconds MAX_UPLOAD_TIMEFRAME{60 * 60 * 24}; // We add a random period time (0 to 1 seconds) to feeler connections to prevent synchronization. #define FEELER_SLEEP_WINDOW 1 -// MSG_NOSIGNAL is not available on some platforms, if it doesn't exist define it as 0 -#if !defined(MSG_NOSIGNAL) -#define MSG_NOSIGNAL 0 -#endif - -// MSG_DONTWAIT is not available on some platforms, if it doesn't exist define it as 0 -#if !defined(MSG_DONTWAIT) -#define MSG_DONTWAIT 0 -#endif - /** Used to pass flags to the Bind() function */ enum BindFlags { BF_NONE = 0, |