[master] 866b419 Fix a printf format issue with time_t
Poul-Henning Kamp
phk at varnish-cache.org
Mon Feb 13 11:00:14 CET 2012
commit 866b4195e0c0877d16d952949eca1d0ca02aba45
Author: Charlie Root <root at a30p.freebsd.dk>
Date: Mon Feb 13 09:59:23 2012 +0000
Fix a printf format issue with time_t
diff --git a/lib/libvarnish/cli_serve.c b/lib/libvarnish/cli_serve.c
index 547061c..0de26b1 100644
--- a/lib/libvarnish/cli_serve.c
+++ b/lib/libvarnish/cli_serve.c
@@ -34,6 +34,7 @@
#include <ctype.h>
#include <errno.h>
#include <poll.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -107,7 +108,7 @@ VCLS_func_ping(struct cli *cli, const char * const *av, void *priv)
(void)priv;
(void)av;
t = time(NULL);
- VCLI_Out(cli, "PONG %ld 1.0", t);
+ VCLI_Out(cli, "PONG %jd 1.0", (intmax_t)t);
}
/*--------------------------------------------------------------------*/
More information about the varnish-commit
mailing list