cli: cast timeval fields to long for format

This hides platform differences between struct timeval field types.
This commit is contained in:
Jani Nikula 2014-10-28 09:17:26 +01:00 committed by David Bremner
parent 961937988e
commit 0bb1f26a26

View file

@ -197,7 +197,7 @@ tempfilename (const void *ctx)
gettimeofday (&tv, NULL);
filename = talloc_asprintf (ctx, "%ld.M%ldP%d.%s",
tv.tv_sec, tv.tv_usec, pid, hostname);
(long) tv.tv_sec, (long) tv.tv_usec, pid, hostname);
if (! filename)
fprintf (stderr, "Error: %s\n", strerror (ENOMEM));