From 25da1ee36cfb99f6ef60e7883952c2370c718725 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sun, 5 Mar 2017 09:32:00 +0000 Subject: 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. --- src/compat.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/compat.h') diff --git a/src/compat.h b/src/compat.h index 6f4d4e65f0..fca6e6101a 100644 --- a/src/compat.h +++ b/src/compat.h @@ -72,16 +72,6 @@ typedef u_int SOCKET; #define MAX_PATH 1024 #endif -// As Solaris does not have the MSG_NOSIGNAL flag for send(2) syscall, it is defined as 0 -#if !defined(HAVE_MSG_NOSIGNAL) && !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) && !defined(MSG_DONTWAIT) -#define MSG_DONTWAIT 0 -#endif - #if HAVE_DECL_STRNLEN == 0 size_t strnlen( const char *start, size_t max_len); #endif // HAVE_DECL_STRNLEN -- cgit v1.2.3