From eb9a7bed76c6b8ad5423f6d4be383ae7d1c375dc Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Sat, 1 Apr 2023 09:03:39 -0700 Subject: [PATCH] fix warning about member variable initialization order + minor makefile build fix --- ixwebsocket/IXWebSocketTransport.cpp | 2 +- makefile.dev | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ixwebsocket/IXWebSocketTransport.cpp b/ixwebsocket/IXWebSocketTransport.cpp index 459fe37f..75519fba 100644 --- a/ixwebsocket/IXWebSocketTransport.cpp +++ b/ixwebsocket/IXWebSocketTransport.cpp @@ -71,10 +71,10 @@ namespace ix , _closingTimePoint(std::chrono::steady_clock::now()) , _enablePong(kDefaultEnablePong) , _pingIntervalSecs(kDefaultPingIntervalSecs) + , _pongReceived(false) , _setCustomMessage(false) , _kPingMessage("ixwebsocket::heartbeat") , _pingType(SendMessageKind::Ping) - , _pongReceived(false) , _pingCount(0) , _lastSendPingTimePoint(std::chrono::steady_clock::now()) { diff --git a/makefile.dev b/makefile.dev index e4c57c37..07929baa 100644 --- a/makefile.dev +++ b/makefile.dev @@ -13,16 +13,24 @@ all: brew install: brew +-DCMAKE_INSTALL_PREFIX=/opt/homebrew + # Use -DCMAKE_INSTALL_PREFIX= to install into another location # on osx it is good practice to make /usr/local user writable # sudo chown -R `whoami`/staff /usr/local # +# Those days (since Apple Silicon mac shipped), on macOS homebrew installs in /opt/homebrew, and /usr/local is readonly +# # Release, Debug, MinSizeRel, RelWithDebInfo are the build types # # Default rule does not use python as that requires first time users to have Python3 installed # brew: +ifeq ($(shell uname),Darwin) + mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_INSTALL_PREFIX=/opt/homebrew -DCMAKE_UNITY_BUILD=OFF -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 -DUSE_TEST=1 .. ; ninja install) +else mkdir -p build && (cd build ; cmake -GNinja -DCMAKE_UNITY_BUILD=OFF -DCMAKE_INSTALL_MESSAGE=LAZY -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 -DUSE_TEST=1 .. ; ninja install) +endif # Docker default target. We've had problems with OpenSSL and TLS 1.3 (on the # server side ?) and I can't work-around it easily, so we're using mbedtls on