From 2fc52665682c9fabf887923e0105cc1912a2e956 Mon Sep 17 00:00:00 2001 From: Kevin Lo Date: Mon, 20 Mar 2023 13:45:26 +0800 Subject: [PATCH] Add OpenBSD support --- Makefile | 4 ++++ ggml.c | 2 +- utils.cpp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1601079a4..fdc5eea15 100644 --- a/Makefile +++ b/Makefile @@ -52,6 +52,10 @@ ifeq ($(UNAME_S),NetBSD) CFLAGS += -pthread CXXFLAGS += -pthread endif +ifeq ($(UNAME_S),OpenBSD) + CFLAGS += -pthread + CXXFLAGS += -pthread +endif ifeq ($(UNAME_S),Haiku) CFLAGS += -pthread CXXFLAGS += -pthread diff --git a/ggml.c b/ggml.c index 4813f74c8..44bebd756 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__) && !defined(__NetBSD__) +#elif !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) #include #endif diff --git a/utils.cpp b/utils.cpp index 08d5c6ba6..a548135da 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__) && !defined(__NetBSD__) + #elif !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) #include #endif