]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Define MSG_NOSIGNAL if it is missing.
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 7 Jul 2010 17:39:21 +0000 (11:39 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Wed, 7 Jul 2010 17:39:21 +0000 (11:39 -0600)
Solaris and possibly others do not provide this optional optimization.

src/fd.cc

index a22b38b7cdd2af5343bdcdc4e2ac6388d633edec..e895d9c1f4b8820d4d7c41d2e6dbc8c404be8aa8 100644 (file)
--- a/src/fd.cc
+++ b/src/fd.cc
 #include "SquidTime.h"
 #include "Debug.h"
 
+
+// Solaris and possibly others lack MSG_NOSIGNAL optimization
+// TODO: move this into compat/? Use a dedicated compat file to avoid dragging
+// sys/types.h and sys/socket.h into the rest of Squid??
+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0
+#endif
+
 int default_read_method(int, char *, int);
 int default_write_method(int, const char *, int);
 #ifdef _SQUID_MSWIN_