diff --git a/Makefile b/Makefile index 15094a4..d29f182 100644 --- a/Makefile +++ b/Makefile @@ -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 (,$(findstring musl,$(CCV))) + CFLAGS += -D_POSIX_SOURCE -D_GNU_SOURCE + CXXFLAGS += -D_POSIX_SOURCE -D_GNU_SOURCE +endif + # OS specific # TODO: support Windows ifeq ($(UNAME_S),Linux)