[vcpkg] Fix OSX build for old GCC versions
MODIFY
include/vcpkg/globalstate.h
include/vcpkg/globalstate.h
@@ -22,6 +22,8 @@ namespace vcpkg
struct CtrlCStateMachine
{
+ CtrlCStateMachine();
+
void transition_to_spawn_process() noexcept;
void transition_from_spawn_process() noexcept;
void transition_handle_ctrl_c() noexcept;
@@ -34,7 +36,7 @@ namespace vcpkg
exit_requested,
};
- std::atomic<CtrlCState> m_state = CtrlCState::normal;
+ std::atomic<CtrlCState> m_state;
};
static CtrlCStateMachine g_ctrl_c_state;

MODIFY
src/vcpkg/globalstate.cpp
src/vcpkg/globalstate.cpp
@@ -17,6 +17,8 @@ namespace vcpkg
GlobalState::CtrlCStateMachine GlobalState::g_ctrl_c_state;
+ GlobalState::CtrlCStateMachine::CtrlCStateMachine() : m_state(CtrlCState::normal) {}
+
void GlobalState::CtrlCStateMachine::transition_to_spawn_process() noexcept
{
auto expected = CtrlCState::normal;

[vcpkg] Fix OSX build for old GCC versions