From: Christian Hesse Date: Thu, 15 Dec 2016 15:06:14 +0100 Message-Id: <20161215140614.24291-1-list@...1798...> In-Reply-To: <1481808689.98151.88.camel@...1866...> References: <1481808689.98151.88.camel@...1866...> MIME-Version: 1.0 Subject: [Openvpn-devel] [PATCH 1/1] replace deprecated LZ4 function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable To: OpenVPN Development Cc: Christian Hesse , David Woodhouse From: Christian Hesse The LZ4 function LZ4_compress_limitedOutput() is deprecated, compiler gives warning: warning: =E2=80=98LZ4_compress_limitedOutput=E2=80=99 is deprecated: use LZ4_compress_default() instead The new function LZ4_compress_default() appeared in r129 (1.7.0), so replace the function there. Signed-off-by: Christian Hesse --- src/openvpn/comp-lz4.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openvpn/comp-lz4.c b/src/openvpn/comp-lz4.c index 6b7c49b..a6ce4f7 100644 --- a/src/openvpn/comp-lz4.c +++ b/src/openvpn/comp-lz4.c @@ -87,7 +87,11 @@ do_lz4_compress(struct buffer *buf, return false; } =20 +#if defined LZ4_VERSION_NUMBER && LZ4_VERSION_NUMBER >=3D 10700 + zlen =3D LZ4_compress_default((const char *)BPTR(buf), (char *)BPT= R(work), BLEN(buf), zlen_max ); +#else zlen =3D LZ4_compress_limitedOutput((const char *)BPTR(buf), (char= *)BPTR(work), BLEN(buf), zlen_max ); +#endif =20 if (zlen <=3D 0) { --=20 2.11.0