]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
Fixes #1511 lambda issue for w64devkit (mingw) (#1513)
authorDannyDaemonic <redacted>
Thu, 18 May 2023 17:30:40 +0000 (10:30 -0700)
committerGitHub <redacted>
Thu, 18 May 2023 17:30:40 +0000 (19:30 +0200)
* Fix for w64devkit and mingw

examples/main/main.cpp

index fe1c847a7f4904601868fbd40269fb2e23cc2494..18673ed2e00f2926b961d199114a5f2e2b24035a 100644 (file)
@@ -241,7 +241,7 @@ int main(int argc, char ** argv) {
         sigint_action.sa_flags = 0;
         sigaction(SIGINT, &sigint_action, NULL);
 #elif defined (_WIN32)
-        auto console_ctrl_handler = [](DWORD ctrl_type) -> BOOL {
+        auto console_ctrl_handler = +[](DWORD ctrl_type) -> BOOL {
             return (ctrl_type == CTRL_C_EVENT) ? (sigint_handler(SIGINT), true) : false;
         };
         SetConsoleCtrlHandler(static_cast<PHANDLER_ROUTINE>(console_ctrl_handler), true);