[Openvpn-devel] Fix compilation with --disable-lzo and --disable-lz4

Message ID 20200805062548.38082-1-lstipakov@gmail.com
State Accepted
Headers show
Series [Openvpn-devel] Fix compilation with --disable-lzo and --disable-lz4 | expand

Commit Message

Lev Stipakov Aug. 4, 2020, 8:25 p.m. UTC
struct compress_options is defined under USE_COMP, therefore
compilation fails when it is referenced without that define.

Since function show_compression_warning, which uses aforementioned
struct, is only called under USE_COMP, it is safe to wrap its definition
under USE_COMP, which fixes compilation issue.

Signed-off-by: Lev Stipakov <lstipakov@gmail.com>
 src/openvpn/options.c | 2 ++
 1 file changed, 2 insertions(+)


Gert Doering Aug. 5, 2020, 3:42 a.m. UTC | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

Thanks.  Tested that it indeed fixes things, and that it is 
not necessary for 2.4 (compile-tested only).

Added "trac #1308" to the commit message.

Your patch has been applied to the master branch.

commit dab34fdd0639c6de8c5ca759cca00b7e60da32f1
Author: Lev Stipakov
Date:   Wed Aug 5 06:25:48 2020 +0000

     Fix compilation with --disable-lzo and --disable-lz4

     Signed-off-by: Lev Stipakov <lstipakov@gmail.com>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20200805062548.38082-1-lstipakov@gmail.com>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg20637.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>

kind regards,

Gert Doering


diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index bc256b18..1c246f4b 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -5085,6 +5085,7 @@  set_user_script(struct options *options,
+#ifdef USE_COMP
 static void
 show_compression_warning(struct compress_options *info)
@@ -5103,6 +5104,7 @@  show_compression_warning(struct compress_options *info)
 static void
 add_option(struct options *options,