From: Lev Stipakov Date: Fri, 22 Sep 2023 10:39:00 +0000 (+0200) Subject: CMake: fix HAVE_DAEMON detection on Linux X-Git-Tag: v2.7_alpha1~406 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e363b393f2d1b72590666554e17d928c1603f8d5;p=thirdparty%2Fopenvpn.git CMake: fix HAVE_DAEMON detection on Linux On Linux, daemon() is defined in unistd.h, not in stdlib.h like in MacOS or FreeBSD. Change-Id: I30f4ea502a36eca155cbc79b89c0d18ee3419877 Signed-off-by: Lev Stipakov Acked-by: Gert Doering Message-Id: <20230922103900.37205-1-frank@lichtenheld.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27058.html Signed-off-by: Gert Doering --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 454ef62d4..376a06091 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -158,7 +158,7 @@ check_symbol_exists(epoll_create sys/epoll.h HAVE_EPOLL_CREATE) check_symbol_exists(gettimeofday sys/time.h HAVE_GETTIMEOFDAY) check_symbol_exists(basename libgen.h HAVE_BASENAME) check_symbol_exists(chsize io.h HAVE_CHSIZE) -check_symbol_exists(daemon stdlib.h HAVE_DAEMON) +check_symbol_exists(daemon "unistd.h;stdlib.h" HAVE_DAEMON) check_symbol_exists(dirname libgen.h HAVE_DIRNAME) check_symbol_exists(getrlimit sys/resource.h HAVE_GETRLIMIT) check_symbol_exists(mlockall sys/mman.h HAVE_MLOCKALL)