aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-03-16 12:02:54 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-03-16 12:03:00 +0100
commit8b789d814199f9860425f71c2dd990d6a2c56cf3 (patch)
tree014ab4a8016ae7165d33dbea0dde46446f0349f5 /src/net.cpp
parent598ef9c44b3ea2cc142c175f077b493f39f5ba22 (diff)
parenta4d1c9f0417e25b0aac937f07edf2bb642b84f09 (diff)
Merge #9921: build: Probe MSG_DONTWAIT in the same way as MSG_NOSIGNAL
a4d1c9f compat: use `unsigned int` instead of `u_int` (Wladimir J. van der Laan) 25da1ee build: cleanup: define MSG_DONTWAIT/MSG_NO_SIGNAL locally (Wladimir J. van der Laan) c459d50 build: Probe MSG_DONTWAIT in the same way as MSG_NOSIGNAL (Wladimir J. van der Laan) Tree-SHA512: 60d79d69439bb181465e4244aa5ddc28bbd84f69c0ca0c753956b3798c9022394e29d791bc085fe7ffb1268c64c789a57e24797daad63525bb776088188ff9ae
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 4434793c4c..113823f0b4 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -44,10 +44,15 @@
// We add a random period time (0 to 1 seconds) to feeler connections to prevent synchronization.
#define FEELER_SLEEP_WINDOW 1
-#if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
+#if !defined(HAVE_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(HAVE_MSG_DONTWAIT)
+#define MSG_DONTWAIT 0
+#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