From: Nathan Cutler Date: Tue, 27 Jul 2021 13:27:58 +0000 (+0200) Subject: compression/snappy: use uint32_t to be compatible with 1.1.9 X-Git-Tag: v17.1.0~1259^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4c13a798dcf2e783afd7558bf3541dc025de854a;p=ceph.git compression/snappy: use uint32_t to be compatible with 1.1.9 The snappy project made the following change in snappy.h between version 1.1.8 and 1.1.9: < bool GetUncompressedLength(Source* source, uint32_t* result); --- > bool GetUncompressedLength(Source* source, uint32* result); This causes Ceph to FTBFS with snappy 1.1.9. Thanks to Chris Denice for bringing this to our attention via Redmine. Fixes: https://tracker.ceph.com/issues/50934 Signed-off-by: Nathan Cutler --- diff --git a/src/compressor/snappy/SnappyCompressor.h b/src/compressor/snappy/SnappyCompressor.h index 25393f8dc1ff..93206c4007be 100644 --- a/src/compressor/snappy/SnappyCompressor.h +++ b/src/compressor/snappy/SnappyCompressor.h @@ -97,8 +97,8 @@ class SnappyCompressor : public Compressor { if (qat_enabled) return qat_accel.decompress(p, compressed_len, dst, compressor_message); #endif - snappy::uint32 res_len = 0; BufferlistSource source_1(p, compressed_len); + uint32_t res_len = 0; if (!snappy::GetUncompressedLength(&source_1, &res_len)) { return -1; }