]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4695: squidpurge: GCC 7 build errors
authorLubos Uhliarik <luhliari@redhat.com>
Thu, 4 May 2017 10:03:19 +0000 (22:03 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 4 May 2017 10:03:19 +0000 (22:03 +1200)
tools/purge/purge.cc

index 3ef9147a4faecb36478a4ea7c5ea81de21497969..c6d1f73ef5a376c0a8f9e3384f16d1bd9ae4e356 100644 (file)
@@ -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 );