From: Roy Marples Date: Mon, 22 Jul 2019 15:12:53 +0000 (+0100) Subject: Cast time_t to long long to satisfy printf. X-Git-Tag: v8.0.0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b295db4dd52bb7ff39bc06645d1a77257f0ebaab;p=thirdparty%2Fdhcpcd.git Cast time_t to long long to satisfy printf. There is no standard primitive for it. --- diff --git a/src/ipv6nd.c b/src/ipv6nd.c index e4cde483..1c4d8c84 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -1405,10 +1405,11 @@ ipv6nd_env(FILE *fp, const struct interface *ifp) snprintf(ndprefix, sizeof(ndprefix), "nd%zu", i); if (efprintf(fp, "%s_from=%s", ndprefix, rap->sfrom) == -1) return -1; - if (efprintf(fp, "%s_acquired=%ld", ndprefix, - rap->acquired.tv_sec) == -1) + if (efprintf(fp, "%s_acquired=%lld", ndprefix, + (long long)rap->acquired.tv_sec) == -1) return -1; - if (efprintf(fp, "%s_now=%ld", ndprefix, now.tv_sec) == -1) + if (efprintf(fp, "%s_now=%lld", ndprefix, + (long long)now.tv_sec) == -1) return -1; /* Zero our indexes */