diff --git a/routing/dht.c b/routing/dht.c index 53163ec..0e210b6 100644 --- a/routing/dht.c +++ b/routing/dht.c @@ -60,6 +60,12 @@ THE SOFTWARE. #include #endif +#if defined(__APPLE__) || defined(__MACH__) +#ifndef MSG_NOSIGNAL +#define MSG_NOSIGNAL SO_NOSIGPIPE +#endif +#endif + #include "libp2p/routing/dht.h" #ifndef HAVE_MEMMEM