diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd-network/sd-lldp.c | 2 | ||||
-rw-r--r-- | src/network/networkctl.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libsystemd-network/sd-lldp.c b/src/libsystemd-network/sd-lldp.c index fa45310059..86c734b8c2 100644 --- a/src/libsystemd-network/sd-lldp.c +++ b/src/libsystemd-network/sd-lldp.c @@ -495,7 +495,7 @@ int sd_lldp_save(sd_lldp *lldp, const char *lldp_file) { if (time - p->until <= 0) continue; - sprintf(buf, "'_TTL=%lu' ", p->until); + sprintf(buf, "'_TTL="USEC_FMT"' ", p->until); k = strappend(s, buf); if (!k) diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 15dfb81e2a..cc3ea85e8c 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -972,7 +972,7 @@ static int link_lldp_status(int argc, char *argv[], void *userdata) { time = now(CLOCK_BOOTTIME); - sscanf(b, "%lu", &until); + sscanf(b, USEC_FMT, &until); ttl = (until - time) / USEC_PER_SEC; @@ -986,7 +986,7 @@ static int link_lldp_status(int argc, char *argv[], void *userdata) { } if (until > time) { - printf("%10s %24s %16s %16lu %16s\n", links[i].name, chassis, port, ttl, cap); + printf("%10s %24s %16s %16"PRIu64" %16s\n", links[i].name, chassis, port, ttl, cap); j++; } } |