mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
build: cleanup: define MSG_DONTWAIT/MSG_NO_SIGNAL locally
Define MSG_DONTWAIT and MSG_NO_SIGNAL in the implementation files that use them (`net.cpp` and `netbase.cpp`), instead of compat.h which is included all over the place. This avoids putting them in the global namespace, as defining them as 0 is a hack that works for our specific usage, but it is not a general solution. Also makes sure they are defined only once so the `!defined(MSG_x)` guard can go.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
|
||||
#include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith()
|
||||
|
||||
#if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
|
||||
#if !defined(HAVE_MSG_NOSIGNAL)
|
||||
#define MSG_NOSIGNAL 0
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user