From 969b7ce6850ad62eec5afd4542c33db9d1784c12 Mon Sep 17 00:00:00 2001 From: Mikkel Laursen <30197207+Mikke404@users.noreply.github.com> Date: Tue, 27 Oct 2026 18:20:40 +0100 Subject: [PATCH] keypair.cpp: include for alloca on Windows keypair.cpp calls alloca without including , where MSVC declares it. It compiled only because MSVC's includes , and only when _HAS_EXCEPTIONS is 1. With exceptions fully disabled (/EHs-c- /D_HAS_EXCEPTIONS=0) the build fails with error C3861: 'alloca': identifier not found. Co-Authored-By: Claude Opus 5.5 --- src/common/keypair.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/keypair.cpp b/src/common/keypair.cpp index 6941f859..f090687d 100644 --- a/src/common/keypair.cpp +++ b/src/common/keypair.cpp @@ -9,6 +9,10 @@ #include "crypto_25519.h" #include +#ifdef _WIN32 +#include // alloca; MSVC's only includes it when _HAS_EXCEPTIONS=1 +#endif + static const char k_szOpenSSHPrivatKeyPEMHeader[] = "-----BEGIN OPENSSH PRIVATE KEY-----"; static const char k_szOpenSSHPrivatKeyPEMFooter[] = "-----END OPENSSH PRIVATE KEY-----";