summaryrefslogtreecommitdiffstats
path: root/contrib/pf
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2005-12-25 22:57:08 +0000
committermlaier <mlaier@FreeBSD.org>2005-12-25 22:57:08 +0000
commit74c57f2ec087f221b0548ee90a5d191a21a1ab49 (patch)
tree56eb6f17f47f5b56df7cf9937caa21690f695356 /contrib/pf
parentd03771dd86be794cb4a83a8e24605c744cbe3219 (diff)
downloadFreeBSD-src-74c57f2ec087f221b0548ee90a5d191a21a1ab49.zip
FreeBSD-src-74c57f2ec087f221b0548ee90a5d191a21a1ab49.tar.gz
Fix build after timeval.tv_sec changed from long to time_t.
Diffstat (limited to 'contrib/pf')
-rw-r--r--contrib/pf/authpf/authpf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/pf/authpf/authpf.c b/contrib/pf/authpf/authpf.c
index af75027..22fdfa4 100644
--- a/contrib/pf/authpf/authpf.c
+++ b/contrib/pf/authpf/authpf.c
@@ -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:
OpenPOWER on IntegriCloud