This document describes the steps to update the bundled lz4 version, that is,
the version used when ./configure
is run with --disable-lz4-ext
.
- For each file in the lz4 repository's
lib
directory (checked out to the appropriate version tag), copy it into the librdkafkasrc
directory, overwriting the previous files. - Copy
xxhash.h
andxxhash.c
files, and rename them tordxxhash.h
andrdxxhash.c
, respectively, replacing the previous files. Change any#include
s ofxxhash.h
tordxxhash.h
. - Replace the
#else
block of the#if defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
with the following code, including the comment:#else /* NOTE: While upgrading the lz4 version, replace the original `#else` block * in the code with this block, and retain this comment. */ struct rdkafka_s; extern void *rd_kafka_mem_malloc(struct rdkafka_s *rk, size_t s); extern void *rd_kafka_mem_calloc(struct rdkafka_s *rk, size_t n, size_t s); extern void rd_kafka_mem_free(struct rdkafka_s *rk, void *p); # define ALLOC(s) rd_kafka_mem_malloc(NULL, s) # define ALLOC_AND_ZERO(s) rd_kafka_mem_calloc(NULL, 1, s) # define FREEMEM(p) rd_kafka_mem_free(NULL, p) #endif
- Change version mentioned for lz4 in
configure.self
. - Run
./configure
with--disable-lz4-ext
option, make and run test 0017. - Update CHANGELOG.md and both the lz4 LICENSE, and the combined LICENSE.