diff options
Diffstat (limited to 'meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1003-use-daemon-from-the-C-library-when-possible.patch')
| -rw-r--r-- | meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1003-use-daemon-from-the-C-library-when-possible.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1003-use-daemon-from-the-C-library-when-possible.patch b/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1003-use-daemon-from-the-C-library-when-possible.patch new file mode 100644 index 0000000000..8575c102ef --- /dev/null +++ b/meta-oe/recipes-connectivity/inetutils/inetutils-1.8/inetutils-1.8-1003-use-daemon-from-the-C-library-when-possible.patch | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | From 3b9f64c6a668849b37b884a7826885c70b95787b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mike Frysinger <vapier at gentoo.org> | ||
| 3 | Date: Thu, 18 Nov 2010 22:24:06 -0500 | ||
| 4 | Subject: [PATCH] use daemon from the C library when possible | ||
| 5 | |||
| 6 | Signed-off-by: Mike Frysinger <vapier at gentoo.org> | ||
| 7 | --- | ||
| 8 | configure.ac | 2 +- | ||
| 9 | libinetutils/daemon.c | 2 ++ | ||
| 10 | 2 files changed, 3 insertions(+), 1 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/configure.ac b/configure.ac | ||
| 13 | index 79d655c..25cc3db 100644 | ||
| 14 | --- a/configure.ac | ||
| 15 | +++ b/configure.ac | ||
| 16 | @@ -579,7 +579,7 @@ AC_FUNC_MMAP | ||
| 17 | AC_FUNC_MALLOC | ||
| 18 | AC_FUNC_REALLOC | ||
| 19 | |||
| 20 | -AC_CHECK_FUNCS(bcopy bcmp bzero cfsetspeed cgetent dirfd fchdir flock \ | ||
| 21 | +AC_CHECK_FUNCS(bcopy bcmp bzero cfsetspeed cgetent daemon dirfd fchdir flock \ | ||
| 22 | fpathconf ftruncate \ | ||
| 23 | getcwd getmsg getspnam initgroups initsetproctitle killpg \ | ||
| 24 | mkstemp ptsname \ | ||
| 25 | diff --git a/libinetutils/daemon.c b/libinetutils/daemon.c | ||
| 26 | index 2156af4..9beb255 100644 | ||
| 27 | --- a/libinetutils/daemon.c | ||
| 28 | +++ b/libinetutils/daemon.c | ||
| 29 | @@ -197,8 +197,10 @@ waitdaemon (int nochdir, int noclose, int maxwait) | ||
| 30 | return ppid; | ||
| 31 | } | ||
| 32 | |||
| 33 | +#ifndef HAVE_DAEMON | ||
| 34 | int | ||
| 35 | daemon (int nochdir, int noclose) | ||
| 36 | { | ||
| 37 | return (waitdaemon (nochdir, noclose, 0) == -1) ? -1 : 0; | ||
| 38 | } | ||
| 39 | +#endif | ||
| 40 | -- | ||
| 41 | 1.7.3.2 | ||
| 42 | |||
