diff --git a/include/boost/iostreams/filter/bzip2.hpp b/include/boost/iostreams/filter/bzip2.hpp index 959f57e..1fc9991 100755 --- a/include/boost/iostreams/filter/bzip2.hpp +++ b/include/boost/iostreams/filter/bzip2.hpp @@ -15,7 +15,7 @@ #include // allocator. #include // failure. #include // bad_alloc. -#include // MSVC, STATIC_CONSTANT, DEDUCED_TYPENAME. +#include // MSVC, STATIC_CONSTANT, DEDUCED_TYPENAME, DINKUM. #include #include // buffer size. #include @@ -275,7 +275,12 @@ void* bzip2_allocator::alloc(void* self, int items, int size) { size_type len = items * size; char* ptr = - static_cast(self)->allocate(len + sizeof(size_type)); + static_cast(self)->allocate + (len + sizeof(size_type) + #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) + , (char*)0 + #endif + ); *reinterpret_cast(ptr) = len; return ptr + sizeof(size_type); }