mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-29 18:05:58 +02:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -21,7 +21,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)
|
||||
#if !defined(MSG_NOSIGNAL)
|
||||
#define MSG_NOSIGNAL 0
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user