Merge pull request #580 from wigyori/cc-libpcap
[15.05/openwrt.git] / package / network / services / openvpn / patches / 101-backport_upstream_polarssl_debug_call.patch
1 openvpn: fix build without POLARSSL_DEBUG_C
2
3 Backport of upstream master commit
4 b63f98633dbe2ca92cd43fc6f8597ab283a600bf.
5
6 Signed-off-by: Magnus Kroken <mkroken@gmail.com>
7
8 From b63f98633dbe2ca92cd43fc6f8597ab283a600bf Mon Sep 17 00:00:00 2001
9 From: Steffan Karger <steffan@karger.me>
10 Date: Tue, 14 Jun 2016 22:00:03 +0200
11 Subject: [PATCH] mbedtls: don't set debug threshold if compiled without
12  MBEDTLS_DEBUG_C
13
14 For targets with space constraints, one might want to compile mbed TLS
15 without MBEDTLS_DEBUG_C defined, to save some tens of kilobytes.  Make
16 sure OpenVPN still compiles if that is the case.
17
18 Signed-off-by: Steffan Karger <steffan@karger.me>
19 Acked-by: Gert Doering <gert@greenie.muc.de>
20 Message-Id: <1465934403-22226-1-git-send-email-steffan@karger.me>
21 URL: http://article.gmane.org/gmane.network.openvpn.devel/11922
22 Signed-off-by: Gert Doering <gert@greenie.muc.de>
23 --- a/src/openvpn/ssl_polarssl.c
24 +++ b/src/openvpn/ssl_polarssl.c
25 @@ -747,7 +747,9 @@ void key_state_ssl_init(struct key_state
26    if (polar_ok(ssl_init(ks_ssl->ctx)))
27      {
28        /* Initialise SSL context */
29 +      #ifdef POLARSSL_DEBUG_C
30        debug_set_threshold(3);
31 +      #endif
32        ssl_set_dbg (ks_ssl->ctx, my_debug, NULL);
33        ssl_set_endpoint (ks_ssl->ctx, ssl_ctx->endpoint);