From c8fc7a6f37ed516cc19da69d4fb9c4450823bc79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=98=8E?= Date: Sun, 20 Sep 2020 19:14:48 +0100 Subject: [PATCH] ios: adapt to MSG_NOSIGNAL available in iOS SDK 12+ --- lib/plat/unix/private-lib-plat-unix.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/plat/unix/private-lib-plat-unix.h b/lib/plat/unix/private-lib-plat-unix.h index feb222739..c894aff22 100644 --- a/lib/plat/unix/private-lib-plat-unix.h +++ b/lib/plat/unix/private-lib-plat-unix.h @@ -183,6 +183,8 @@ delete_from_fd(const struct lws_context *context, int fd); * but happily have something equivalent in the SO_NOSIGPIPE flag. */ #ifdef __APPLE__ +/* iOS SDK 12+ seems to define it, undef it for compatibility both ways */ +#undef MSG_NOSIGNAL #define MSG_NOSIGNAL SO_NOSIGPIPE #endif