]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
event: fix formating of time_t
authorVincent Bernat <vincent@bernat.im>
Mon, 13 Jun 2016 06:18:42 +0000 (08:18 +0200)
committerVincent Bernat <vincent@bernat.im>
Mon, 13 Jun 2016 06:18:42 +0000 (08:18 +0200)
On OpenBSD, this is now a long long. Just cast to long long to be safe.

src/daemon/event.c

index 4846478ff4f6396d141f37665b6c80deff8b7584..05c25680339e95ee561d54f87989caa9a6634de1 100644 (file)
@@ -782,8 +782,11 @@ levent_schedule_cleanup(struct lldpd *cfg)
                TAILQ_FOREACH(port, &hardware->h_rports, p_entries) {
                        if (now >= port->p_lastupdate + port->p_chassis->c_ttl) {
                                tv.tv_sec = 0;
-                               log_debug("event", "immediate cleanup on port %s (%ld, %d, %ld)",
-                                   hardware->h_ifname, now, port->p_chassis->c_ttl, port->p_lastupdate);
+                               log_debug("event", "immediate cleanup on port %s (%lld, %d, %lld)",
+                                   hardware->h_ifname,
+                                   (long long)now,
+                                   port->p_chassis->c_ttl,
+                                   (long long)port->p_lastupdate);
                                break;
                        }
                        next = port->p_chassis->c_ttl - (now - port->p_lastupdate);