aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/CMakeLists.txt4
-rw-r--r--src/nvim/os/process.c2
-rw-r--r--third-party/cmake/BuildLuajit.cmake6
3 files changed, 11 insertions, 1 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 606baff619..2728ae9b06 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -359,6 +359,10 @@ endforeach()
# Our dependencies come first.
+if (CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+ list(APPEND NVIM_LINK_LIBRARIES pthread c++abi)
+endif()
+
if (LibIntl_FOUND)
list(APPEND NVIM_LINK_LIBRARIES ${LibIntl_LIBRARY})
endif()
diff --git a/src/nvim/os/process.c b/src/nvim/os/process.c
index 63eea9022b..a67e7487eb 100644
--- a/src/nvim/os/process.c
+++ b/src/nvim/os/process.c
@@ -18,7 +18,7 @@
# include <sys/user.h>
#endif
-#if defined(__NetBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__)
# include <sys/param.h>
#endif
diff --git a/third-party/cmake/BuildLuajit.cmake b/third-party/cmake/BuildLuajit.cmake
index e65a81bba5..2fda221b12 100644
--- a/third-party/cmake/BuildLuajit.cmake
+++ b/third-party/cmake/BuildLuajit.cmake
@@ -35,10 +35,16 @@ function(BuildLuajit)
INSTALL_COMMAND "${_luajit_INSTALL_COMMAND}")
endfunction()
+if(CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+ set(AMD64_ABI "LDFLAGS=-lpthread -lc++abi")
+else()
+ set(AMD64_ABI "")
+endif()
set(INSTALLCMD_UNIX ${MAKE_PRG} CFLAGS=-fPIC
CFLAGS+=-DLUAJIT_DISABLE_JIT
CFLAGS+=-DLUA_USE_APICHECK
CFLAGS+=-DLUA_USE_ASSERT
+ ${AMD64_ABI}
CCDEBUG+=-g
Q=
install)