bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-inetutils] [PATCH 3/4] use daemon from the C library when possible


From: Mike Frysinger
Subject: [bug-inetutils] [PATCH 3/4] use daemon from the C library when possible
Date: Fri, 19 Nov 2010 02:04:55 -0500

Signed-off-by: Mike Frysinger <address@hidden>
---
 configure.ac          |    2 +-
 libinetutils/daemon.c |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 79d655c..25cc3db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -579,7 +579,7 @@ AC_FUNC_MMAP
 AC_FUNC_MALLOC
 AC_FUNC_REALLOC
 
-AC_CHECK_FUNCS(cfsetspeed cgetent dirfd fchdir flock \
+AC_CHECK_FUNCS(cfsetspeed cgetent daemon dirfd fchdir flock \
                fpathconf ftruncate \
               getcwd getmsg getspnam initgroups initsetproctitle killpg \
                mkstemp ptsname \
diff --git a/libinetutils/daemon.c b/libinetutils/daemon.c
index 2156af4..9beb255 100644
--- a/libinetutils/daemon.c
+++ b/libinetutils/daemon.c
@@ -197,8 +197,10 @@ waitdaemon (int nochdir, int noclose, int maxwait)
   return ppid;
 }
 
+#ifndef HAVE_DAEMON
 int
 daemon (int nochdir, int noclose)
 {
   return (waitdaemon (nochdir, noclose, 0) == -1) ? -1 : 0;
 }
+#endif
-- 
1.7.3.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]