Hi, On Thu, Sep 07, 2017 at 10:40:21PM +0200, Simon Matter wrote: > While we are at it, I found it useful to see the used LZ4 version at > runtime as it is done with LZO and other libraries. > > I've patched my rpms with the patch attached. [..]
> diff -Naur openvpn-2.4.0.orig/src/openvpn/comp-lz4.h > openvpn-2.4.0/src/openvpn/comp-lz4.h > --- openvpn-2.4.0.orig/src/openvpn/comp-lz4.h 2016-12-26 12:51:00.000000000 > +0100 > +++ openvpn-2.4.0/src/openvpn/comp-lz4.h 2017-01-17 09:11:12.000000000 > +0100 > @@ -28,6 +28,10 @@ > > #if defined(ENABLE_LZ4) > > +#if defined(HAVE_LZ4_H) > +#include "lz4.h" > +#endif > + > #include "buffer.h" Feature-ACK (I think this is a useful idea, for the same reasons we have LZO and OpenSSL versions :-) ), but that will not work if we use compat-lz4.h, so "code NAK". comp-lz4.c currently has #if defined(NEED_COMPAT_LZ4) #include "compat-lz4.h" #else #include "lz4.h" #endif which might just be moved to comp-lz4.h, and then things should work. > extern const struct compress_alg lz4_alg; > diff -Naur openvpn-2.4.0.orig/src/openvpn/options.c > openvpn-2.4.0/src/openvpn/options.c > --- openvpn-2.4.0.orig/src/openvpn/options.c 2016-12-26 12:51:00.000000000 > +0100 > +++ openvpn-2.4.0/src/openvpn/options.c 2017-01-17 09:11:12.000000000 > +0100 > @@ -4121,11 +4121,17 @@ > #else > #define LZO_LIB_VER_STR "", "" > #endif > +#ifdef ENABLE_LZ4 > +#define LZ4_LIB_VER_STR ", LZ4 ", LZ4_versionString() > +#else > +#define LZ4_LIB_VER_STR "", "" > +#endif > > - msg(flags, "library versions: %s%s%s", SSL_LIB_VER_STR, LZO_LIB_VER_STR); > + msg(flags, "library versions: %s%s%s%s%s", SSL_LIB_VER_STR, > LZO_LIB_VER_STR, LZ4_LIB_VER_STR); > > #undef SSL_LIB_VER_STR > #undef LZO_LIB_VER_STR > +#undef LZ4_LIB_VER_STR > } That part looks good. gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025 g...@net.informatik.tu-muenchen.de
signature.asc
Description: PGP 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