Don't use SEASTAR_HAVE_LZ4_COMPRESS_DEFAULT in scylla
The existence of LZ4_compress_default is a property of the lz4 library, not seastar. With this patch scylla does its own configure check instead of depending on the one done by seastar. Signed-off-by: Rafael Ávila de Espíndola <espindola@scylladb.com> Message-Id: <20190114013737.5395-1-espindola@scylladb.com>
This commit is contained in:
committed by
Avi Kivity
parent
684fb607c4
commit
acd6999ba9
@@ -247,7 +247,7 @@ size_t lz4_processor::compress(const char* input, size_t input_len,
|
||||
output[1] = (input_len >> 8) & 0xFF;
|
||||
output[2] = (input_len >> 16) & 0xFF;
|
||||
output[3] = (input_len >> 24) & 0xFF;
|
||||
#ifdef SEASTAR_HAVE_LZ4_COMPRESS_DEFAULT
|
||||
#ifdef HAVE_LZ4_COMPRESS_DEFAULT
|
||||
auto ret = LZ4_compress_default(input, output + 4, input_len, LZ4_compressBound(input_len));
|
||||
#else
|
||||
auto ret = LZ4_compress(input, output + 4, input_len);
|
||||
|
||||
@@ -981,6 +981,14 @@ if not try_compile(compiler=args.cxx, source='''\
|
||||
print('Installed boost version too old. Please update {}.'.format(pkgname("boost-devel")))
|
||||
sys.exit(1)
|
||||
|
||||
if try_compile(args.cxx, source = textwrap.dedent('''\
|
||||
#include <lz4.h>
|
||||
|
||||
void m() {
|
||||
LZ4_compress_default(static_cast<const char*>(0), static_cast<char*>(0), 0, 0);
|
||||
}
|
||||
'''), flags=args.user_cflags.split()):
|
||||
defines.append("HAVE_LZ4_COMPRESS_DEFAULT")
|
||||
|
||||
has_sanitize_address_use_after_scope = try_compile(compiler=args.cxx, flags=['-fsanitize-address-use-after-scope'], source='int f() {}')
|
||||
|
||||
|
||||
@@ -1293,7 +1293,7 @@ void cql_server::response::compress_lz4()
|
||||
output[1] = (input_len >> 16) & 0xFF;
|
||||
output[2] = (input_len >> 8) & 0xFF;
|
||||
output[3] = input_len & 0xFF;
|
||||
#ifdef SEASTAR_HAVE_LZ4_COMPRESS_DEFAULT
|
||||
#ifdef HAVE_LZ4_COMPRESS_DEFAULT
|
||||
auto ret = LZ4_compress_default(input, output + 4, input_len, LZ4_compressBound(input_len));
|
||||
#else
|
||||
auto ret = LZ4_compress(input, output + 4, input_len);
|
||||
|
||||
Reference in New Issue
Block a user