From: Lubos Uhliarik Date: Wed, 12 Apr 2017 03:12:29 +0000 (+1200) Subject: Bug 4695: squidpurge: GCC 7 build errors X-Git-Tag: M-staged-PR71~197 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2d51fa427bb22f4f0e1c8a4bda71c37f94c6d236;p=thirdparty%2Fsquid.git Bug 4695: squidpurge: GCC 7 build errors --- diff --git a/tools/purge/purge.cc b/tools/purge/purge.cc index 3ef9147a4f..c6d1f73ef5 100644 --- a/tools/purge/purge.cc +++ b/tools/purge/purge.cc @@ -272,7 +272,7 @@ log_extended( const char* fn, int code, long size, const SquidMetaList* meta ) snprintf( md5, sizeof(md5), "%-32s", "(no_md5_data_available)" ); } - char timeb[64]; + char timeb[256]; if ( meta && (findings = meta->search( STORE_META_STD )) ) { StoreMetaStd temp; // make data aligned, avoid SIGBUS on RISC machines (ARGH!) @@ -283,7 +283,7 @@ log_extended( const char* fn, int code, long size, const SquidMetaList* meta ) } else if ( meta && (findings = meta->search( STORE_META_STD_LFS )) ) { StoreMetaStdLFS temp; // make data aligned, avoid SIGBUS on RISC machines (ARGH!) - memcpy( &temp, findings->data, sizeof(StoreMetaStd) ); + memcpy( &temp, findings->data, sizeof(StoreMetaStdLFS) ); snprintf( timeb, sizeof(timeb), "%08lx %08lx %08lx %08lx %04x %5hu ", (unsigned long)temp.timestamp, (unsigned long)temp.lastref, (unsigned long)temp.expires, (unsigned long)temp.lastmod, temp.flags, temp.refcount );