From: Eric Leblond Date: Tue, 18 Jun 2013 08:57:19 +0000 (+0200) Subject: unix-socket: fix OSX build X-Git-Tag: suricata-2.0beta1~112 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d8ce2b1ca41bedb7683bd5f23db869a8e8b896a0;p=thirdparty%2Fsuricata.git unix-socket: fix OSX build MSG_NOSIGNAL is not defined on macOSX and SO_NOSIGPIPE is used instead. --- diff --git a/src/unix-manager.c b/src/unix-manager.c index 5c7aa2fd1d..6bf01ef878 100644 --- a/src/unix-manager.c +++ b/src/unix-manager.c @@ -40,6 +40,13 @@ #ifdef BUILD_UNIX_SOCKET #include +// MSG_NOSIGNAL does not exists on OS X +#ifdef OS_DARWIN +# ifndef MSG_NOSIGNAL +# define MSG_NOSIGNAL SO_NOSIGPIPE +# endif +#endif + #define SOCKET_PATH LOCAL_STATE_DIR "/run/suricata/" #define SOCKET_FILENAME "suricata-command.socket" #define SOCKET_TARGET SOCKET_PATH SOCKET_FILENAME