]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Cast time_t to long long to satisfy printf.
authorRoy Marples <roy@marples.name>
Mon, 22 Jul 2019 15:12:53 +0000 (16:12 +0100)
committerRoy Marples <roy@marples.name>
Mon, 22 Jul 2019 15:12:53 +0000 (16:12 +0100)
There is no standard primitive for it.

src/ipv6nd.c

index e4cde4836e977d0f84be25d78408df66261bc707..1c4d8c84636db964511d341ccc4a3d01f5360f7c 100644 (file)
@@ -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 */