Skip to contentSkip to conversation

Change in openvpn[master]: CMake: fix HAVE_DAEMON detection on Linux

Openvpn-devel In review stipa (Code Review) 3 participants 6 messages Sep 21, 2023 – Sep 22, 2023 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): gerrit.1695305263000.I30f4ea502a36eca155cbc79b89c0d18ee3419877@...2715...

#1 lore raw

Attention is currently required from: flichtenheld.

Hello flichtenheld,

I'd like you to do a code review.
Please visit

    http://gerrit.openvpn.net/c/openvpn/+/362?usp=email

to review the following change.

Change subject: CMake: fix HAVE_DAEMON detection on Linux
......................................................................

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

---
M CMakeLists.txt

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/62/362/1

CMakeLists.txt +1 -1
index 9de6aba..76351c1 100644
@@ -158,7 +158,7 @@
 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)
Signature · 13 lines
To view, visit http://gerrit.openvpn.net/c/openvpn/+/362?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I30f4ea502a36eca155cbc79b89c0d18ee3419877
Gerrit-Change-Number: 362
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-MessageType: newchange
#2 lore raw
In reply to a message not in the archive

Attention is currently required from: flichtenheld, stipa.

cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/362?usp=email )

Change subject: CMake: fix HAVE_DAEMON detection on Linux
......................................................................

Patch Set 1: Code-Review+2

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/362?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I30f4ea502a36eca155cbc79b89c0d18ee3419877
Gerrit-Change-Number: 362
Gerrit-PatchSet: 1
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Attention: stipa <[email protected]...>
Gerrit-Comment-Date: Fri, 22 Sep 2023 10:07:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

#3 lore raw

PATCH 1/1 CMake: fix HAVE_DAEMON detection on Linux

In reply to a message not in the archive

From: Lev Stipakov <[email protected]...>

On Linux, daemon() is defined in unistd.h, not in
stdlib.h like in MacOS or FreeBSD.

Change-Id I30f4ea502a36eca155cbc79b89c0d18ee3419877

---

This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/362
This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above):
cron2 <cron2>

CMakeLists.txt +1 -1
index 9de6aba..76351c1 100644
@@ -158,7 +158,7 @@
 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)
#4 lore raw

[Openvpn-devel] [PATCH applied] Re: CMake: fix HAVE_DAEMON detection on Linux

As discussed on IRC - the previous "cmake related" patch related to "compat-daemon.c" was triggered by cmake not finding daemon() on Linux, and this is fixing it.

Your patch has been applied to the master branch.

commit e363b393f2d1b72590666554e17d928c1603f8d5 (master)

Author: Lev Stipakov
Date:   Fri Sep 22 12:39:00 2023 +0200
     CMake: fix HAVE_DAEMON detection on Linux

     Signed-off-by: Lev Stipakov <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg27058.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

#5 lore raw
In reply to a message not in the archive

cron2 has uploaded a new patch set (#2) to the change originally created by stipa. ( http://gerrit.openvpn.net/c/openvpn/+/362?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by cron2

Change subject: CMake: fix HAVE_DAEMON detection on Linux
......................................................................

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

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27058.html

---
M CMakeLists.txt

1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/62/362/2

CMakeLists.txt +1 -1
index 454ef62..376a060 100644
@@ -158,7 +158,7 @@
 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)

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/362?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I30f4ea502a36eca155cbc79b89c0d18ee3419877
Gerrit-Change-Number: 362
Gerrit-PatchSet: 2
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset

#6 lore raw
In reply to a message not in the archive

cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/362?usp=email )

Change subject: CMake: fix HAVE_DAEMON detection on Linux
......................................................................

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

Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27058.html

---
M CMakeLists.txt

1 file changed, 1 insertion(+), 1 deletion(-)
CMakeLists.txt +1 -1
index 454ef62..376a060 100644
@@ -158,7 +158,7 @@
 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)

--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/362?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I30f4ea502a36eca155cbc79b89c0d18ee3419877
Gerrit-Change-Number: 362
Gerrit-PatchSet: 2
Gerrit-Owner: stipa <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: flichtenheld <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged