From 2c14faf0aa1cfe0f8d70af1938dcad5b4d6d3b59 Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 5 Feb 2015 06:15:33 +0000 Subject: Fix build problem with recent LZMA library. Fix retreival of LZMA and bzip2 compressors from make_compressor. Allow setting compression level from command line. --- src/lib/compression/lzma/lzma.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/lib/compression/lzma/lzma.cpp') diff --git a/src/lib/compression/lzma/lzma.cpp b/src/lib/compression/lzma/lzma.cpp index c7e6ab815..93a969d70 100644 --- a/src/lib/compression/lzma/lzma.cpp +++ b/src/lib/compression/lzma/lzma.cpp @@ -23,10 +23,11 @@ class LZMA_Stream : public Zlib_Style_Stream public: LZMA_Stream() { - streamp()->allocator = new ::lzma_allocator; - streamp()->allocator->opaque = alloc(); - streamp()->allocator->alloc = Compression_Alloc_Info::malloc; - streamp()->allocator->free = Compression_Alloc_Info::free; + auto a = new ::lzma_allocator; + a->opaque = alloc(); + a->alloc = Compression_Alloc_Info::malloc; + a->free = Compression_Alloc_Info::free; + streamp()->allocator = a; } ~LZMA_Stream() -- cgit v1.2.3