[master] c99382d Fix build for 32bit systems
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Sat Sep 3 08:18:08 CEST 2016
commit c99382d6519364715a36cbd000cbfa0dcb576fb7
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Sat Sep 3 08:08:42 2016 +0200
Fix build for 32bit systems
diff --git a/bin/varnishd/hpack/vhp_decode.c b/bin/varnishd/hpack/vhp_decode.c
index 334db2d..49a0e74 100644
--- a/bin/varnishd/hpack/vhp_decode.c
+++ b/bin/varnishd/hpack/vhp_decode.c
@@ -1190,15 +1190,15 @@ main(int argc, char **argv)
}
if (verbose) {
- printf("sizeof (struct vhd_int)=%ju\n",
+ printf("sizeof (struct vhd_int)=%zu\n",
sizeof (struct vhd_int));
- printf("sizeof (struct vhd_lookup)=%ju\n",
+ printf("sizeof (struct vhd_lookup)=%zu\n",
sizeof (struct vhd_lookup));
- printf("sizeof (struct vhd_raw)=%ju\n",
+ printf("sizeof (struct vhd_raw)=%zu\n",
sizeof (struct vhd_raw));
- printf("sizeof (struct vhd_huffman)=%ju\n",
+ printf("sizeof (struct vhd_huffman)=%zu\n",
sizeof (struct vhd_huffman));
- printf("sizeof (struct vhd_decode)=%ju\n",
+ printf("sizeof (struct vhd_decode)=%zu\n",
sizeof (struct vhd_decode));
}
diff --git a/bin/varnishd/hpack/vhp_table.c b/bin/varnishd/hpack/vhp_table.c
index 26a046b..547a446 100644
--- a/bin/varnishd/hpack/vhp_table.c
+++ b/bin/varnishd/hpack/vhp_table.c
@@ -767,9 +767,9 @@ main(int argc, char **argv)
}
if (verbose) {
- printf("sizeof (struct vht_table) == %ju\n",
+ printf("sizeof (struct vht_table) == %zu\n",
sizeof (struct vht_table));
- printf("sizeof (struct vht_entry) == %ju\n",
+ printf("sizeof (struct vht_entry) == %zu\n",
sizeof (struct vht_entry));
printf("\n");
}
diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c
index 4a90d24..224b308 100644
--- a/bin/varnishtest/vtc_http2.c
+++ b/bin/varnishtest/vtc_http2.c
@@ -32,6 +32,7 @@
#include <sys/socket.h>
#include <errno.h>
+#include <inttypes.h>
#include <math.h>
#include <poll.h>
#include <stdio.h>
@@ -1084,7 +1085,7 @@ cmd_var_resolve(const struct stream *s, const char *spec, char *buf)
* Id of the stream this one depends on.
*/
else if (!strcmp(spec, "stream.window")) {
- snprintf(buf, 20, "%ld", s->id ? s->ws : s->hp->ws);
+ snprintf(buf, 20, "%" PRIu64 "d", s->id ? s->ws : s->hp->ws);
return (buf);
}
else if (!strcmp(spec, "stream.weight")) {
@@ -2735,7 +2736,7 @@ b64_settings(const struct http *hp, const char *s)
HPK_ResizeTbl(hp->decctx, v);
}
- vtc_log(hp->vl, 4, "Upgrade: %s (%d): %ld", buf, i, v);
+ vtc_log(hp->vl, 4, "Upgrade: %s (%d): %" PRIu64 "d", buf, i, v);
}
}
More information about the varnish-commit
mailing list