diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2020-12-08 10:54:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 10:54:46 -0500 |
commit | 0a808249b8a5cecb9e0be1b489b987717d7eca51 (patch) | |
tree | 86c5df56fc61dd3f1c2e8704e792950d67498bc5 /netdata-installer.sh | |
parent | 4426c51bffd814a9e3efcf149a62c40a01eb090d (diff) |
Added patch to build LWS properly on macOS. (#10333)
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-x | netdata-installer.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh index 2752c7ca66..3eb9b433a6 100755 --- a/netdata-installer.sh +++ b/netdata-installer.sh @@ -619,6 +619,27 @@ build_libwebsockets() { fi pushd "${1}" > /dev/null || exit 1 + + if [ "$(uname)" = "Darwin" ]; then + run patch -p1 << "EOF" +--- a/lib/plat/unix/private.h ++++ b/lib/plat/unix/private.h +@@ -164,6 +164,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 +EOF + + # shellcheck disable=SC2181 + if [ $? -ne 0 ]; then + return 1 + fi + fi + if [ "$(uname)" = "Darwin" ] && [ -d /usr/local/opt/openssl ]; then run ${env_cmd} cmake \ -D OPENSSL_ROOT_DIR=/usr/local/opt/openssl \ |