aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--ggml.c2
-rw-r--r--utils.cpp2
3 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8388c29..1601079 100644
--- a/Makefile
+++ b/Makefile
@@ -48,6 +48,10 @@ ifeq ($(UNAME_S),FreeBSD)
CFLAGS += -pthread
CXXFLAGS += -pthread
endif
+ifeq ($(UNAME_S),NetBSD)
+ CFLAGS += -pthread
+ CXXFLAGS += -pthread
+endif
ifeq ($(UNAME_S),Haiku)
CFLAGS += -pthread
CXXFLAGS += -pthread
diff --git a/ggml.c b/ggml.c
index 7b0b456..58a4c9b 100644
--- a/ggml.c
+++ b/ggml.c
@@ -2,7 +2,7 @@
#if defined(_MSC_VER) || defined(__MINGW32__)
#include <malloc.h> // using malloc.h with MSC/MINGW
-#elif !defined(__FreeBSD__)
+#elif !defined(__FreeBSD__) && !defined(__NetBSD__)
#include <alloca.h>
#endif
diff --git a/utils.cpp b/utils.cpp
index b340bd6..54217f0 100644
--- a/utils.cpp
+++ b/utils.cpp
@@ -11,7 +11,7 @@
#if defined(_MSC_VER) || defined(__MINGW32__)
#include <malloc.h> // using malloc.h with MSC/MINGW
- #elif !defined(__FreeBSD__)
+ #elif !defined(__FreeBSD__) && !defined(__NetBSD__)
#include <alloca.h>
#endif