On 15/12/16 15:06, Christian Hesse wrote:
> From: Christian Hesse <m...@eworm.de>
> 
> The LZ4 function LZ4_compress_limitedOutput() is deprecated, compiler
> gives warning:
> 
> warning: ‘LZ4_compress_limitedOutput’ 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 <m...@eworm.de>
> ---
>  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;
>          }
>  
> +#if defined LZ4_VERSION_NUMBER && LZ4_VERSION_NUMBER >= 10700
> +        zlen = LZ4_compress_default((const char *)BPTR(buf), (char 
> *)BPTR(work), BLEN(buf), zlen_max );
> +#else
>          zlen = LZ4_compress_limitedOutput((const char *)BPTR(buf), (char 
> *)BPTR(work), BLEN(buf), zlen_max );
> +#endif
>  
>          if (zlen <= 0)
>          {
> 

This makes sense.  But I think we should do this in relation to an
update of the compat-lz4 library we also ship in OpenVPN.  I'm running
some tests now, and will submit a new mail thread which includes this
patch together with the compat-lz4.[ch] update.

This will be handled post v2.4.0 release, so we don't rush the testing
of the LZ4 support and inadvertently break anything.


-- 
kind regards,

David Sommerseth
OpenVPN Technologies, Inc


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to