odhcpd_hexlify(duidbuf, ctxt.c->clid_data, ctxt.c->clid_len);
/* iface DUID iaid hostname lifetime assigned length [addrs...] */
- ctxt.buf_idx = snprintf(ctxt.buf, ctxt.buf_len, "# %s %s %x %s%s %ld %x %u ",
+ ctxt.buf_idx = snprintf(ctxt.buf, ctxt.buf_len, "# %s %s %x %s%s %"PRId64" %x %u ",
ctxt.iface->ifname, duidbuf, ntohl(ctxt.c->iaid),
(ctxt.c->flags & OAF_BROKEN_HOSTNAME) ? "broken\\x20" : "",
(ctxt.c->hostname ? ctxt.c->hostname : "-"),
(ctxt.c->valid_until > now ?
- (ctxt.c->valid_until - now + wall_time) :
+ (int64_t)(ctxt.c->valid_until - now + wall_time) :
(INFINITE_VALID(ctxt.c->valid_until) ? -1 : 0)),
ctxt.c->assigned, (unsigned)ctxt.c->length);
odhcpd_hexlify(duidbuf, c->hwaddr, sizeof(c->hwaddr));
/* iface DUID iaid hostname lifetime assigned length [addrs...] */
- ctxt.buf_idx = snprintf(ctxt.buf, ctxt.buf_len, "# %s %s ipv4 %s%s %ld %x 32 ",
+ ctxt.buf_idx = snprintf(ctxt.buf, ctxt.buf_len, "# %s %s ipv4 %s%s %"PRId64" %x 32 ",
ctxt.iface->ifname, duidbuf,
(c->flags & OAF_BROKEN_HOSTNAME) ? "broken\\x20" : "",
(c->hostname ? c->hostname : "-"),
(c->valid_until > now ?
- (c->valid_until - now + wall_time) :
+ (int64_t)(c->valid_until - now + wall_time) :
(INFINITE_VALID(c->valid_until) ? -1 : 0)),
ntohl(c->addr));