diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2011-03-23 22:28:28 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2011-03-23 22:28:28 +0100 |
commit | 83bc01436eebc00fb646e1e494f3e42b46d5335b (patch) | |
tree | d5b7b764811b0a827545f80e505decdd9f7f4366 /compat | |
parent | 0c00334599535746e09d84af484d5de3758d3e43 (diff) |
provide a definition of daemon() for systems that lack it
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1403 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'compat')
-rw-r--r-- | compat/daemon.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/compat/daemon.h b/compat/daemon.h index 8d10514..5a2b02a 100644 --- a/compat/daemon.h +++ b/compat/daemon.h @@ -1,7 +1,7 @@ /* daemon.h - definition of daemon() for systems that lack it - Copyright (C) 2002, 2003, 2008 Arthur de Jong + Copyright (C) 2002, 2003, 2008, 2011 Arthur de Jong This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -24,8 +24,11 @@ #include <unistd.h> -/* deamonize process, optionally chdir to / and optionally close stdin, - strdout and stderr and redirect them to /dev/null */ +#if !HAVE_DECL_DAEMON +/* we define daemon() here because on some platforms the function is + undefined: deamonize process, optionally chdir to / and optionally + close stdin, strdout and stderr and redirect them to /dev/null */ int daemon(int nochdir,int noclose); +#endif /* not HAVE_DECL_DAEMON */ #endif /* not COMPAT__DAEMON_H */ |