From fa8ce2a207de805d24d1ef2a686242e42025cf82 Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Mon, 13 Mar 2023 12:25:28 +0100 Subject: [PATCH] Add NetBSD support. --- Makefile | 4 ++++ ggml.c | 2 +- utils.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8388c290d..1601079a4 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 fbd7b9339..0124768ea 100644 --- a/ggml.c +++ b/ggml.c @@ -2,7 +2,7 @@ #if defined(_MSC_VER) || defined(__MINGW32__) #include // using malloc.h with MSC/MINGW -#elif !defined(__FreeBSD__) +#elif !defined(__FreeBSD__) && !defined(__NetBSD__) #include #endif diff --git a/utils.cpp b/utils.cpp index b340bd61b..54217f02f 100644 --- a/utils.cpp +++ b/utils.cpp @@ -11,7 +11,7 @@ #if defined(_MSC_VER) || defined(__MINGW32__) #include // using malloc.h with MSC/MINGW - #elif !defined(__FreeBSD__) + #elif !defined(__FreeBSD__) && !defined(__NetBSD__) #include #endif