Skip to content

Commit

Permalink
ggml : fix cross-compile Linux -> Window with mingw (ggerganov#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Nov 23, 2022
1 parent 3e79b67 commit 39b70c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Supported platforms:
- [x] [iOS](examples/whisper.objc)
- [x] Linux
- [x] [WebAssembly](examples/whisper.wasm)
- [x] Windows ([MSVC](https://github.com/ggerganov/whisper.cpp/blob/master/.github/workflows/build.yml#L117-L144) and [MinGW](https://github.com/ggerganov/whisper.cpp/issues/5)]
- [x] Windows ([MSVC](https://github.com/ggerganov/whisper.cpp/blob/master/.github/workflows/build.yml#L117-L144) and [MinGW](https://github.com/ggerganov/whisper.cpp/issues/168)]
- [x] [Raspberry Pi](https://github.com/ggerganov/whisper.cpp/discussions/166)
- [x] [Android](https://github.com/ggerganov/whisper.cpp/issues/30)

Expand Down
7 changes: 7 additions & 0 deletions ggml.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
#include <stdio.h>

#if defined _MSC_VER || defined(__MINGW32__)

#ifndef(__MINGW32__)
#include <Windows.h>
#else
// ref: https://github.com/ggerganov/whisper.cpp/issues/168
#include <windows.h>
#include <errno.h>
#endif

typedef volatile LONG atomic_int;
typedef atomic_int atomic_bool;
Expand Down

0 comments on commit 39b70c5

Please sign in to comment.