File tree Expand file tree Collapse file tree 7 files changed +18
-10
lines changed Expand file tree Collapse file tree 7 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -36,12 +36,11 @@ CFLAGS = -I. -O3 -DNDEBUG -std=c11 -fPIC
36
36
CXXFLAGS = -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC
37
37
LDFLAGS =
38
38
39
- # clock_gettime came in POSIX.1b (1993)
40
- # CLOCK_MONOTONIC came in POSIX.1-2001 / SUSv3 as optional
41
- # posix_memalign came in POSIX.1-2001 / SUSv3
42
- # M_PI is an XSI extension since POSIX.1-2001 / SUSv3, came in XPG1 (1985)
43
- CFLAGS += -D_XOPEN_SOURCE=600
44
- CXXFLAGS += -D_XOPEN_SOURCE=600
39
+ # ref: https://github.com/ggerganov/whisper.cpp/issues/37
40
+ ifneq ($(wildcard /usr/include/musl/* ) ,)
41
+ CFLAGS += -D_POSIX_SOURCE -D_GNU_SOURCE
42
+ CXXFLAGS += -D_POSIX_SOURCE -D_GNU_SOURCE
43
+ endif
45
44
46
45
# RLIMIT_MEMLOCK came in BSD, is not specified in POSIX.1,
47
46
# and on macOS its availability depends on enabling Darwin extensions
Original file line number Diff line number Diff line change 6
6
// ref: https://github.com/ggerganov/whisper.cpp/issues/171
7
7
//
8
8
9
- #include " common-sdl.h"
10
9
#include " common.h"
10
+ #include " common-sdl.h"
11
11
#include " whisper.h"
12
12
13
13
#include < sstream>
Original file line number Diff line number Diff line change 3
3
// A very quick-n-dirty implementation serving mainly as a proof of concept.
4
4
//
5
5
6
- #include " common-sdl.h"
7
6
#include " common.h"
7
+ #include " common-sdl.h"
8
8
#include " whisper.h"
9
9
10
10
#include < cassert>
Original file line number Diff line number Diff line change
1
+ // Defines fileno on msys:
2
+ #ifndef _GNU_SOURCE
3
+ #define _GNU_SOURCE
4
+ #include < cstddef>
5
+ #include < cstdint>
6
+ #include < cstdio>
7
+ #endif
8
+
1
9
#include " llama-util.h"
2
10
#include " llama.h"
3
11
Original file line number Diff line number Diff line change 1
1
// Talk with AI
2
2
//
3
3
4
- #include " common-sdl.h"
5
4
#include " common.h"
5
+ #include " common-sdl.h"
6
6
#include " whisper.h"
7
7
#include " llama.h"
8
8
Original file line number Diff line number Diff line change 1
1
// Talk with AI
2
2
//
3
3
4
- #include " common-sdl.h"
5
4
#include " common.h"
5
+ #include " common-sdl.h"
6
6
#include " whisper.h"
7
7
#include " gpt-2.h"
8
8
Original file line number Diff line number Diff line change
1
+ #define _GNU_SOURCE // Defines CLOCK_MONOTONIC on Linux
1
2
#define _CRT_SECURE_NO_DEPRECATE // Disables ridiculous "unsafe" warnigns on Windows
2
3
3
4
#include "ggml.h"
You can’t perform that action at this time.
0 commit comments