From 1a7ed26e74655a290f5236c7e811713ba9b6a778 Mon Sep 17 00:00:00 2001 From: sthen Date: Thu, 25 Apr 2013 21:29:52 +0000 Subject: [PATCH] printf format string fix for long long time_t --- misc/memcached/Makefile | 3 ++- misc/memcached/patches/patch-items_c | 15 +++++++++++++++ www/squid/Makefile | 3 ++- www/squid/patches/patch-src_client_side_reply_cc | 12 ++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 misc/memcached/patches/patch-items_c create mode 100644 www/squid/patches/patch-src_client_side_reply_cc diff --git a/misc/memcached/Makefile b/misc/memcached/Makefile index e5587184fba..d7455281d02 100644 --- a/misc/memcached/Makefile +++ b/misc/memcached/Makefile @@ -1,8 +1,9 @@ -# $OpenBSD: Makefile,v 1.21 2013/03/11 11:23:57 espie Exp $ +# $OpenBSD: Makefile,v 1.22 2013/04/25 21:33:21 sthen Exp $ COMMENT= distributed memory object caching system DISTNAME = memcached-1.4.14 +REVISION = 0 CATEGORIES= misc HOMEPAGE= http://www.memcached.org/ diff --git a/misc/memcached/patches/patch-items_c b/misc/memcached/patches/patch-items_c new file mode 100644 index 00000000000..27decbc6077 --- /dev/null +++ b/misc/memcached/patches/patch-items_c @@ -0,0 +1,15 @@ +$OpenBSD: patch-items_c,v 1.5 2013/04/25 21:33:21 sthen Exp $ +--- items.c.orig Thu Apr 25 22:31:03 2013 ++++ items.c Thu Apr 25 22:31:47 2013 +@@ -389,9 +389,9 @@ char *do_item_cachedump(const unsigned int slabs_clsid + /* Copy the key since it may not be null-terminated in the struct */ + strncpy(key_temp, ITEM_key(it), it->nkey); + key_temp[it->nkey] = 0x00; /* terminate */ +- len = snprintf(temp, sizeof(temp), "ITEM %s [%d b; %lu s]\r\n", ++ len = snprintf(temp, sizeof(temp), "ITEM %s [%d b; %llu s]\r\n", + key_temp, it->nbytes - 2, +- (unsigned long)it->exptime + process_started); ++ (unsigned long long)it->exptime + process_started); + if (bufcurr + len + 6 > memlimit) /* 6 is END\r\n\0 */ + break; + memcpy(buffer + bufcurr, temp, len); diff --git a/www/squid/Makefile b/www/squid/Makefile index 303e271d5d2..67e549bd5bd 100644 --- a/www/squid/Makefile +++ b/www/squid/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.150 2013/03/21 08:48:55 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.151 2013/04/25 21:29:52 sthen Exp $ MULTI_PACKAGES= -main -ntlm @@ -10,6 +10,7 @@ COMMENT-ldap= LDAP authentication/ACL support for Squid COMMENT-ntlm= NTLM authentication/ACL support for Squid V= 3.2.9 +REVISION-main= 0 DISTNAME= squid-$V PKGNAME-main= squid-$V diff --git a/www/squid/patches/patch-src_client_side_reply_cc b/www/squid/patches/patch-src_client_side_reply_cc new file mode 100644 index 00000000000..51e4edd4816 --- /dev/null +++ b/www/squid/patches/patch-src_client_side_reply_cc @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_client_side_reply_cc,v 1.1 2013/04/25 21:29:52 sthen Exp $ +--- src/client_side_reply.cc.orig Tue Mar 12 04:15:58 2013 ++++ src/client_side_reply.cc Thu Apr 25 15:09:38 2013 +@@ -1309,7 +1309,7 @@ clientReplyContext::buildReplyHeader() + if (http->storeEntry()->timestamp <= squid_curtime) { + // put X-Cache-Age: instead of Age: + char age[64]; +- snprintf(age, sizeof(age), "%ld", (long int) squid_curtime - http->storeEntry()->timestamp); ++ snprintf(age, sizeof(age), "%lld", (long long) squid_curtime - http->storeEntry()->timestamp); + hdr->putExt("X-Cache-Age", age); + } + } else if (http->storeEntry()->timestamp <= squid_curtime) {