Skip to content

Commit

Permalink
make : fix MUSL Linux build (ggerganov#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Mar 22, 2023
1 parent 4125fca commit c5b47e4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Expand Up @@ -34,6 +34,12 @@ CFLAGS = -I. -O3 -DNDEBUG -std=c11 -fPIC
CXXFLAGS = -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC
LDFLAGS =

# ref: https://github.com/ggerganov/whisper.cpp/issues/37
ifneq ($(wildcard /usr/include/musl/*),)
CFLAGS += -D_POSIX_SOURCE -D_GNU_SOURCE
CXXFLAGS += -D_POSIX_SOURCE -D_GNU_SOURCE
endif

# OS specific
# TODO: support Windows
ifeq ($(UNAME_S),Linux)
Expand Down

0 comments on commit c5b47e4

Please sign in to comment.