From c00919e8bd6a4e36d9fa009f3b1a93b262a59fc6 Mon Sep 17 00:00:00 2001 From: Magnus Kroken Date: Fri, 9 Dec 2016 10:07:35 +0100 Subject: [PATCH] mbedtls: include correct net/net_sockets header according to version is deprecated as of mbedTLS 2.4.0, it is renamed . OpenVPN will fail to build with mbedTLS 2.4.0 with MBEDTLS_DEPRECATED_REMOVED defined. Check MBEDTLS_VERSION_NUMBER, and include net.h for < 2.4.0 and net_sockets.h for >= 2.4.0. Signed-off-by: Magnus Kroken Acked-by: Steffan Karger Message-Id: <1481274455-657-1-git-send-email-mkroken@gmail.com> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13451.html Signed-off-by: Gert Doering --- src/openvpn/ssl_mbedtls.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/openvpn/ssl_mbedtls.c b/src/openvpn/ssl_mbedtls.c index 11ee65b77..985a39fef 100644 --- a/src/openvpn/ssl_mbedtls.c +++ b/src/openvpn/ssl_mbedtls.c @@ -51,11 +51,17 @@ #include "ssl_verify_mbedtls.h" #include #include -#include +#include + +#if MBEDTLS_VERSION_NUMBER >= 0x02040000 + #include +#else + #include +#endif + #include #include #include -#include void tls_init_lib() -- 2.47.2