summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/appl/bsd/ChangeLog6
-rw-r--r--src/appl/bsd/configure.in5
-rw-r--r--src/appl/bsd/krlogind.c4
3 files changed, 15 insertions, 0 deletions
diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog
index 41572ad3da..f1fed50602 100644
--- a/src/appl/bsd/ChangeLog
+++ b/src/appl/bsd/ChangeLog
@@ -1,3 +1,9 @@
+2001-06-22 Ezra Peisach <epeisach@mit.edu>
+
+ * krlogind.c: Provide daemon prototype if needed.
+
+ * configure.in: Test if prototype for daemon necessary.
+
2001-06-21 Ezra Peisach <epeisach@mit.edu>
* login.c: Much cleanup to reduce globals and shadowing.
diff --git a/src/appl/bsd/configure.in b/src/appl/bsd/configure.in
index a556cfb754..84a898aad0 100644
--- a/src/appl/bsd/configure.in
+++ b/src/appl/bsd/configure.in
@@ -75,6 +75,11 @@ AC_CHECK_FUNCS(isatty inet_aton gettosbyname killpg initgroups setpriority setre
AC_CHECK_HEADERS(unistd.h stdlib.h string.h sys/filio.h sys/sockio.h sys/label.h sys/tty.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h utmp.h sys/time.h krb4-proto.h sys/ioctl_compat.h paths.h arpa/nameser.h)
AC_HEADER_STDARG
AC_REPLACE_FUNCS(getdtablesize)
+dnl
+KRB5_NEED_PROTO([#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif],daemon,1)
+dnl
KRB5_SIGTYPE
CHECK_SIGNALS
CHECK_SETJMP
diff --git a/src/appl/bsd/krlogind.c b/src/appl/bsd/krlogind.c
index 51edb7e52e..2bced2adf5 100644
--- a/src/appl/bsd/krlogind.c
+++ b/src/appl/bsd/krlogind.c
@@ -310,6 +310,10 @@ char *progname;
static int Pfd;
+#if defined(NEED_DAEMON_PROTO)
+extern int daemon(int, int);
+#endif
+
#if (defined(_AIX) && defined(i386)) || defined(ibm032) || (defined(vax) && !defined(ultrix)) || (defined(SunOS) && SunOS > 40) || defined(solaris20)
#define VHANG_FIRST
#endif