aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt3
-rw-r--r--cmake/InstallHelpers.cmake9
-rw-r--r--src/nvim/os/pty_process_unix.c2
3 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9d56256492..117519230f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -228,7 +228,7 @@ else()
# On FreeBSD 64 math.h uses unguarded C11 extension, which taints clang
# 3.4.1 used there.
- if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+ if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND CMAKE_C_COMPILER_ID MATCHES "Clang")
add_definitions(-Wno-c11-extensions)
endif()
endif()
@@ -456,7 +456,6 @@ include(InstallHelpers)
file(GLOB MANPAGES
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
man/nvim.1)
-
install_helper(
FILES ${MANPAGES}
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
diff --git a/cmake/InstallHelpers.cmake b/cmake/InstallHelpers.cmake
index ee07ba2c66..ca20ddf354 100644
--- a/cmake/InstallHelpers.cmake
+++ b/cmake/InstallHelpers.cmake
@@ -1,3 +1,12 @@
+# Fix CMAKE_INSTALL_MANDIR on BSD before including GNUInstallDirs. #6771
+if(CMAKE_SYSTEM_NAME MATCHES "BSD" AND NOT DEFINED CMAKE_INSTALL_MANDIR)
+ if(DEFINED ENV{MANPREFIX})
+ set(CMAKE_INSTALL_MANDIR "$ENV{MANPREFIX}/man")
+ else()
+ set(CMAKE_INSTALL_MANDIR "/usr/local/man")
+ endif()
+endif()
+
# For $CMAKE_INSTALL_{DATAROOT,MAN, ...}DIR
include(GNUInstallDirs)
diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c
index eb9335b03c..ee3ab96a83 100644
--- a/src/nvim/os/pty_process_unix.c
+++ b/src/nvim/os/pty_process_unix.c
@@ -12,7 +12,7 @@
#include <sys/ioctl.h>
// forkpty is not in POSIX, so headers are platform-specific
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined (__DragonFly__)
# include <libutil.h>
#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
# include <util.h>