From: David Sommerseth Date: Tue, 21 Feb 2017 20:27:37 +0100 Message-Id: <20170221192737.24166-4-davids@...515...> In-Reply-To: <20170221192737.24166-1-davids@...515...> References: <20170221192737.24166-1-davids@...515...> MIME-Version: 1.0 Subject: [Openvpn-devel] [PATCH v2 3/3] 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-devel@lists.sourceforge.net Cc: Christian Hesse 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 e1f83e7..41b7d1b 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