From c9b003735df3a2dcd65e89a19c174f1dac4aeb23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Sat, 21 Dec 2024 07:59:44 +0100 Subject: [PATCH] Fix OpenBSD build --- CMakeLists.txt | 6 +++++- sdn.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e61315..bb3b619 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,8 +8,12 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") endif () find_package (PkgConfig REQUIRED) -pkg_check_modules (NCURSESW REQUIRED ncursesw) pkg_check_modules (ACL libacl) +pkg_check_modules (NCURSESW ncursesw) +if (NOT NCURSESW_FOUND) + find_library (NCURSESW_LIBRARIES NAMES ncursesw) + find_path (NCURSESW_INCLUDE_DIRS ncurses.h PATH_SUFFIXES ncurses) +endif () add_executable (${PROJECT_NAME} ${PROJECT_NAME}.cpp) target_include_directories (${PROJECT_NAME} PUBLIC ${NCURSESW_INCLUDE_DIRS}) diff --git a/sdn.cpp b/sdn.cpp index 4e2a1ab..07f56a2 100644 --- a/sdn.cpp +++ b/sdn.cpp @@ -39,22 +39,22 @@ #include #include #include -#include #include #include +#include #include #include #ifdef __linux__ -#include #include +// ACL information is not important enough to be ported +#include +#include +#include #else #include #endif #include -#include -#include -#include // To implement cbreak() with disabled ^S that gets reënabled on endwin() #define NCURSES_INTERNALS