Patch to fix the build issue on MacOS 10.9.4

Meng Zhang jammy.linux at gmail.com
Wed Jul 30 15:12:44 CEST 2014


Sorry.  The diff in the previous email is wrong. Resent here.

From 52016e3dab92f617124964d275a6ea7c6157d220 Mon Sep 17 00:00:00 2001
From: ijammy <mzhang at yottaa.com>
Date: Wed, 30 Jul 2014 20:57:34 +0800
Subject: [PATCH] Eliminate the compiler complain against the format of
 vsprintf, e.g. format specifies type 'uintmax_t' (aka 'unsigned long') but
 the argument has type 'uint64_t' (aka 'unsigned long long')
 [-Werror,-Wformat]

---
 bin/varnishd/cache/cache_http1_fsm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bin/varnishd/cache/cache_http1_fsm.c b/bin/varnishd/cache/cache_http1_fsm.c
index 66063be..940dd9f 100644
--- a/bin/varnishd/cache/cache_http1_fsm.c
+++ b/bin/varnishd/cache/cache_http1_fsm.c
@@ -72,6 +72,7 @@
 #include <poll.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <inttypes.h>
 
 #include "cache.h"
 #include "hash/hash_slinger.h"
@@ -704,12 +705,12 @@ HTTP1_CacheReqBody(struct req *req, ssize_t maxsize)
 
 		http_Unset(req->http0, H_Content_Length);
 		http_Unset(req->http0, H_Transfer_Encoding);
-		http_PrintfHeader(req->http0, "Content-Length: %ju",
+		http_PrintfHeader(req->http0, "Content-Length: %"PRIu64,
 		    req->req_bodybytes);
 
 		http_Unset(req->http, H_Content_Length);
 		http_Unset(req->http, H_Transfer_Encoding);
-		http_PrintfHeader(req->http, "Content-Length: %ju",
+		http_PrintfHeader(req->http, "Content-Length: %"PRIu64,
 		    req->req_bodybytes);
 
 		req->req_body_status = REQ_BODY_CACHED;
-- 
2.0.1.442.g7fe6834




On 30 Jul, 2014, at 9:04 pm, Meng Zhang <jammy.linux at gmail.com> wrote:

> 
> Hi, @there,
> 
> Here ( https://github.com/varnish/Varnish-Cache/pull/46 ) is a pull-request to fix the build issue on MacOS 10.9.4.
> 
> Thanks
> 
> Regards,
> Meng








-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20140730/e9c3ae5b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Eliminate-the-compiler-complain-against-the-format-o.patch
Type: application/octet-stream
Size: 1451 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20140730/e9c3ae5b/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20140730/e9c3ae5b/attachment-0001.html>


More information about the varnish-dev mailing list