]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
unix-socket: fix OSX build
authorEric Leblond <eric@regit.org>
Tue, 18 Jun 2013 08:57:19 +0000 (10:57 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 18 Jun 2013 09:18:52 +0000 (11:18 +0200)
MSG_NOSIGNAL is not defined on macOSX and SO_NOSIGPIPE is used
instead.

src/unix-manager.c

index 5c7aa2fd1d49532f5ef32735511231a8d34a6db1..6bf01ef878db58a5d7c101e7a3e85ddf961382e9 100644 (file)
 #ifdef BUILD_UNIX_SOCKET
 #include <jansson.h>
 
+// 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