aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorVasil Dimov <[email protected]>2018-03-11 20:19:26 +0100
committerVasil Dimov <[email protected]>2018-03-15 20:02:00 +0100
commit8ae413235d4b3f68f0858a3ce2cd65291f9cbe64 (patch)
tree6a6b0504c1ae2dc2c1fb5db4a2a943c656be0891 /src/net.cpp
parentDo not check for main() in libminiupnpc (diff)
downloaddiscoin-8ae413235d4b3f68f0858a3ce2cd65291f9cbe64.tar.xz
discoin-8ae413235d4b3f68f0858a3ce2cd65291f9cbe64.zip
Remove redundant checks for MSG_* from configure.ac
It is redundant to check for the presence of MSG_NOSIGNAL macro in configure.ac, define HAVE_MSG_NOSIGNAL and then check whether the later is defined in the source code. Instead we can check directly whether MSG_NOSIGNAL is defined. Same for MSG_DONTWAIT. In addition to that, the checks we had in configure.ac produce a compiler warning about unused variable and thus could fail if -Werror is present and erroneously proclaim that the macros are not available.
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 53a0a9b18..4849e067a 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -42,12 +42,13 @@
// 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)
+// 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(HAVE_MSG_DONTWAIT)
+#if !defined(MSG_DONTWAIT)
#define MSG_DONTWAIT 0
#endif