From: Arne Schwabe Date: Wed, 8 May 2024 22:05:12 +0000 (+0200) Subject: Support OpenBSD with cmake X-Git-Tag: v2.7_alpha1~258 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d5ba4acc297a6041bb45f7aa1c9a99b37b7d5e44;p=thirdparty%2Fopenvpn.git Support OpenBSD with cmake Change-Id: I85d4d27333773e8df109e42b1fa56ccf57994e57 Signed-off-by: Arne Schwabe Acked-by: Frank Lichtenheld Message-Id: <20240508220512.12362-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28648.html Signed-off-by: Gert Doering --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 31276119..f8b37a90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,6 +136,8 @@ elseif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") set(TARGET_FREEBSD YES) set(ENABLE_DCO YES) link_libraries(-lnv) +elseif (${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD") + set(TARGET_OPENBSD YES) elseif (${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") set(TARGET_SOLARIS YES) set(HAVE_SYS_SOCKIO_H 1) @@ -169,7 +171,7 @@ check_symbol_exists(nice unistd.h HAVE_NICE) check_symbol_exists(setgid unistd.h HAVE_SETGID) check_symbol_exists(setuid unistd.h HAVE_SETUID) check_symbol_exists(setsid unistd.h HAVE_SETSID) -check_symbol_exists(getpeereid unistd.h HAVE_GETPEEREID) +check_symbol_exists(getpeereid "unistd.h;sys/socket.h" HAVE_GETPEEREID) check_symbol_exists(epoll_create sys/epoll.h HAVE_EPOLL_CREATE)