diff --git a/src/async.c b/src/async.c index a92032c..9711588 100644 --- a/src/async.c +++ b/src/async.c @@ -214,7 +214,7 @@ mpd_async_write(struct mpd_async *async) return true; nbytes = send(async->fd, mpd_buffer_read(&async->output), size, - MSG_DONTWAIT); + MSG_DONTWAIT | MSG_NOSIGNAL); if (nbytes < 0) { /* I/O error */ diff --git a/src/socket.c b/src/socket.c index d5db9c8..759767c 100644 --- a/src/socket.c +++ b/src/socket.c @@ -28,6 +28,9 @@ #ifndef MSG_DONTWAIT # define MSG_DONTWAIT 0 #endif +#ifndef MSG_NOSIGNAL +# define MSG_NOSIGNAL 0 +#endif #ifdef _WIN32