Commit ef4a1061 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Added quirk for SIGPIPE on Apple

* Added quirk for some versions of NetBSD which don't have SO_NOSIGPIPE
* Added error message that if we cannot find how to handle SIGPIPE on the host platform to contact the devel mailing list
parent 497edd90
......@@ -51,10 +51,21 @@
#include <stdio.h>
#include <mysql.h>
#include <setjmp.h>
/* Do not generate SIGPIPE */
#if defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__)
#ifndef MSG_NOSIGNAL
/* SIGPIPE quirks */
#ifndef MSG_NOSIGNAL
/* Operating systems which have SO_NOSIGPIPE but not MSG_NOSIGNAL */
#if defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__APPLE__)
#define MSG_NOSIGNAL SO_NOSIGPIPE
/* Some versions of NetBSD dont have SO_NOSIGPIPE, check if we can use it or define as 0 */
#elif defined(__NetBSD__)
#ifdef SO_NOSIGPIPE
#define MSG_NOSIGNAL SO_NOSIGPIPE
#else
#define MSG_NOSIGNAL 0
#endif
#else
#error Your OS doesnt support MSG_NOSIGNAL or SO_NOSIGPIPE, please report to policyd-devel@lists.sf.net
#endif
#endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment