mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-06-14 20:10:33 -04:00
mbedtls: include correct net/net_sockets header according to version
<mbedtls/net.h> is deprecated as of mbedTLS 2.4.0, it is renamed <mbedtls/net_sockets.h>. 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 <mkroken@gmail.com> Acked-by: Steffan Karger <steffan.karger@fox-it.com> 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 <gert@greenie.muc.de>
This commit is contained in:
parent
4969f0d6bb
commit
c00919e8bd
1 changed files with 8 additions and 2 deletions
|
|
@ -51,11 +51,17 @@
|
|||
#include "ssl_verify_mbedtls.h"
|
||||
#include <mbedtls/debug.h>
|
||||
#include <mbedtls/error.h>
|
||||
#include <mbedtls/net.h>
|
||||
#include <mbedtls/version.h>
|
||||
|
||||
#if MBEDTLS_VERSION_NUMBER >= 0x02040000
|
||||
#include <mbedtls/net_sockets.h>
|
||||
#else
|
||||
#include <mbedtls/net.h>
|
||||
#endif
|
||||
|
||||
#include <mbedtls/oid.h>
|
||||
#include <mbedtls/pem.h>
|
||||
#include <mbedtls/sha256.h>
|
||||
#include <mbedtls/version.h>
|
||||
|
||||
void
|
||||
tls_init_lib()
|
||||
|
|
|
|||
Loading…
Reference in a new issue