From: lnyan Date: Sun, 9 Oct 2022 14:26:37 +0000 (+0800) Subject: Add MinGW support X-Git-Tag: upstream/1.7.4~1971^2 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=4bbb8a587b284ce5cea85b38d3115411051be90c;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp Add MinGW support --- diff --git a/ggml.c b/ggml.c index a87e8dbc..d2853eba 100644 --- a/ggml.c +++ b/ggml.c @@ -1,6 +1,11 @@ #include "ggml.h" +#if defined(_MSC_VER) || defined(__MINGW32__) +#include // using malloc.h with MSC/MINGW +#else #include +#endif + #include #include #include diff --git a/whisper.cpp b/whisper.cpp index 81da4694..4137685e 100644 --- a/whisper.cpp +++ b/whisper.cpp @@ -4,6 +4,7 @@ #include #include +#define _USE_MATH_DEFINES #include #include #include