From ed276160045ef9dcd8d0cbc03fa3509a40e554fe Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Fri, 22 Jun 2001 16:16:45 +0000 Subject: [PATCH] * krlogind.c: Provide daemon prototype if needed * configure.in: Test if prototype for daemon necessary. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13496 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/bsd/ChangeLog | 6 ++++++ src/appl/bsd/configure.in | 5 +++++ src/appl/bsd/krlogind.c | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 41572ad3d..f1fed5060 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,9 @@ +2001-06-22 Ezra Peisach + + * krlogind.c: Provide daemon prototype if needed. + + * configure.in: Test if prototype for daemon necessary. + 2001-06-21 Ezra Peisach * login.c: Much cleanup to reduce globals and shadowing. diff --git a/src/appl/bsd/configure.in b/src/appl/bsd/configure.in index a556cfb75..84a898aad 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 +#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 51edb7e52..2bced2adf 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 -- 2.26.2