Fix build after timeval.tv_sec changed from long to time_t.
This commit is contained in:
parent
d03771dd86
commit
74c57f2ec0
@ -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:
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user