[Openvpn-devel] Fix build with compression disabled

Message ID 20211021115037.27056-1-maximilian.fillinger@foxcrypto.com
State Accepted
Headers show
Series
  • [Openvpn-devel] Fix build with compression disabled
Related show

Commit Message

Maximilian Fillinger Oct. 21, 2021, 11:50 a.m.
From: Max Fillinger <maximilian.fillinger@foxcrypto.com>

When building with both --disable-lz4 and --disable-lzo, the function
comp_non_stub_enabled and various flags are not defined. One of the
places where it is used in options.c was not put behind an #ifdef, which
caused compilation to fail.

Signed-off-by: Max Fillinger <maximilian.fillinger@foxcrypto.com>
---
 src/openvpn/options.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Gert Doering Oct. 21, 2021, 3:19 p.m. | #1
Acked-by: Gert Doering <gert@greenie.muc.de>

"Because it makes sense" :-) - thanks.  Added "Trac: #1435" to the
commit message since we do have a ticket for that problem.

Your patch has been applied to the master branch.

commit 0bc3375f1fff09d21f224eb9f8f9c3943ed4f404
Author: Max Fillinger
Date:   Thu Oct 21 13:50:37 2021 +0200

     Fix build with compression disabled

     Signed-off-by: Max Fillinger <maximilian.fillinger@foxcrypto.com>
     Acked-by: Gert Doering <gert@greenie.muc.de>
     Message-Id: <20211021115037.27056-1-maximilian.fillinger@foxcrypto.com>
     URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23035.html
     Signed-off-by: Gert Doering <gert@greenie.muc.de>


--
kind regards,

Gert Doering

Patch

diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index ed2dcd53..4a5db8a6 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -3205,6 +3205,7 @@  options_set_backwards_compatible_options(struct options *o)
         o->enable_ncp_fallback = true;
     }
 
+#ifdef USE_COMP
     /* Compression is deprecated and we do not want to announce support for it
      * by default anymore, additionally DCO breaks with compression.
      *
@@ -3215,6 +3216,7 @@  options_set_backwards_compatible_options(struct options *o)
     {
         o->comp.flags = COMP_F_ALLOW_STUB_ONLY|COMP_F_ADVERTISE_STUBS_ONLY;
     }
+#endif
 }
 
 static void