* The code now is compilable without SYSLOG_INET again. Thanks to

Enrik Berkhan <enrik@rzstud1.akk.org>.
This commit is contained in:
Joey Schulze 1998-07-10 23:56:53 +00:00
parent 7326d197dd
commit c924428cb7

View File

@ -1484,11 +1484,13 @@ void fprintlog(f, from, flags, msg)
{ {
struct iovec iov[6]; struct iovec iov[6];
register struct iovec *v = iov; register struct iovec *v = iov;
char repbuf[80];
#ifdef SYSLOG_INET
register int l; register int l;
char line[MAXLINE + 1]; char line[MAXLINE + 1];
char repbuf[80];
time_t fwd_suspend; time_t fwd_suspend;
struct hostent *hp; struct hostent *hp;
#endif
dprintf("Called fprintlog, "); dprintf("Called fprintlog, ");
@ -1526,6 +1528,7 @@ void fprintlog(f, from, flags, msg)
dprintf("\n"); dprintf("\n");
break; break;
#ifdef SYSLOG_INET
case F_FORW_SUSP: case F_FORW_SUSP:
fwd_suspend = time((time_t *) 0) - f->f_time; fwd_suspend = time((time_t *) 0) - f->f_time;
if ( fwd_suspend >= INET_SUSPEND_TIME ) { if ( fwd_suspend >= INET_SUSPEND_TIME ) {
@ -1608,6 +1611,7 @@ void fprintlog(f, from, flags, msg)
} }
} }
break; break;
#endif
case F_CONSOLE: case F_CONSOLE:
f->f_time = now; f->f_time = now;
@ -1963,7 +1967,7 @@ void die(sig)
dprintf("syslogd: exiting on signal %d\n", sig); dprintf("syslogd: exiting on signal %d\n", sig);
(void) sprintf(buf, "exiting on signal %d", sig); (void) sprintf(buf, "exiting on signal %d", sig);
errno = 0; errno = 0;
logmsg(LOG_SYSLOG|LOG_INFO, buf); logmsg(LOG_SYSLOG|LOG_INFO, buf, LocalHostName, ADDDATE);
} }
/* Close the sockets. */ /* Close the sockets. */
@ -2223,7 +2227,9 @@ void cfline(line, f)
int singlpri = 0; int singlpri = 0;
int ignorepri = 0; int ignorepri = 0;
int syncfile; int syncfile;
#ifdef SYSLOG_INET
struct hostent *hp; struct hostent *hp;
#endif
char buf[MAXLINE]; char buf[MAXLINE];
dprintf("cfline(%s)\n", line); dprintf("cfline(%s)\n", line);