[1299] in Kerberos-V5-bugs
krb5b4pl3: appl/bsd/logutil.c: declare time() before the first time it's used
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Sun Mar 26 21:18:45 1995
From: "Jonathan I. Kamens" <jik@cam.ov.com>
Date: Sun, 26 Mar 1995 21:21:53 -0500
To: krb5-bugs@MIT.EDU
When appl/bsd/logutil.c is compiled with gcc on a SunOS 4.1.3 machine,
it says:
logutil.c: In function `logwtmp':
logutil.c:147: warning: type mismatch with previous external decl
logutil.c:114: warning: previous external decl of `time'
logutil.c:147: warning: type mismatch with previous implicit declaration
logutil.c:114: warning: previous implicit declaration of `time'
This patch fixes that:
--- logutil.c 1995/03/10 20:18:09 1.2
+++ logutil.c 1995/03/27 02:19:12
@@ -45,6 +45,8 @@
#define EMPTY UT_UNKNOWN
#endif
+time_t time();
+
void login(ut)
struct utmp *ut;
{
@@ -144,7 +146,6 @@
{
struct utmp ut;
struct stat buf;
- time_t time();
if (fd < 0 && (fd = open(WTMP_FILE, O_WRONLY|O_APPEND, 0)) < 0)
return;