From: Thomas Klausner Date: Mon, 13 Mar 2023 16:40:54 +0000 (+0100) Subject: Add NetBSD support. (#90) X-Git-Tag: gguf-v0.4.0~1251 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=41be0a3b3d76ee4f254dc81b42bd8ed26ee324e7;p=pkg%2Fggml%2Fsources%2Fllama.cpp Add NetBSD support. (#90) --- diff --git a/Makefile b/Makefile index 8388c290..1601079a 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 7b0b456f..58a4c9b6 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 b340bd61..54217f02 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