Fix build after timeval.tv_sec changed from long to time_t.

This commit is contained in:
Max Laier 2005-12-25 22:57:08 +00:00
parent 6d072a6e04
commit 8d13037cda
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153722
2 changed files with 13 additions and 2 deletions

View File

@ -42,6 +42,9 @@ __FBSDID("$FreeBSD$");
#include <err.h>
#include <errno.h>
#ifdef __FreeBSD__
#include <inttypes.h>
#endif
#include <login_cap.h>
#include <pwd.h>
#include <signal.h>
@ -702,8 +705,13 @@ change_filter(int add, const char *luser, const char *ipsrc)
syslog(LOG_INFO, "allowing %s, user %s", ipsrc, luser);
} else {
gettimeofday(&Tend, NULL);
#ifdef __FreeBSD__
syslog(LOG_INFO, "removed %s, user %s - duration %jd seconds",
ipsrc, luser, (intmax_t)(Tend.tv_sec - Tstart.tv_sec));
#else
syslog(LOG_INFO, "removed %s, user %s - duration %ld seconds",
ipsrc, luser, Tend.tv_sec - Tstart.tv_sec);
#endif
}
return (0);
no_mem:

View File

@ -75,6 +75,8 @@
#include <net/pfvar.h>
#ifndef __FreeBSD__
#include <inttypes.h>
struct pf_frent {
LIST_ENTRY(pf_frent) fr_next;
struct ip *fr_ip;
@ -1815,8 +1817,9 @@ pf_normalize_tcp_stateful(struct mbuf *m, int off, struct pf_pdesc *pd,
SEQ_LT(tsecr, dst->scrub->pfss_tsval0)? '3' : ' '));
#ifdef __FreeBSD__
DPFPRINTF((" tsval: %u tsecr: %u +ticks: %u "
"idle: %lus %lums\n",
tsval, tsecr, tsval_from_last, delta_ts.tv_sec,
"idle: %jus %lums\n",
tsval, tsecr, tsval_from_last,
(uintmax_t)delta_ts.tv_sec,
delta_ts.tv_usec / 1000));
DPFPRINTF((" src->tsval: %u tsecr: %u\n",
src->scrub->pfss_tsval, src->scrub->pfss_tsecr));