]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Support OpenBSD with cmake
authorArne Schwabe <arne@rfc2549.org>
Wed, 8 May 2024 22:05:12 +0000 (00:05 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 9 May 2024 10:11:39 +0000 (12:11 +0200)
Change-Id: I85d4d27333773e8df109e42b1fa56ccf57994e57
Signed-off-by: Arne Schwabe <arne@rfc2549.org>
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
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 <gert@greenie.muc.de>
CMakeLists.txt

index 31276119e97b6d975b955e6ff489065d5fc7a01d..f8b37a903fc128dfc3d5d165d324f5413c9cfd04 100644 (file)
@@ -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)