mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-16 00:00:07 +01:00
mbedtls: support older versions without net_sockets.h
This commit is contained in:
parent
57fd3b39c5
commit
1acf0b33c7
3 changed files with 9 additions and 0 deletions
|
@ -2226,6 +2226,10 @@ endif()
|
|||
|
||||
CHECK_C_SOURCE_COMPILES("#define _GNU_SOURCE\n#include <unistd.h>\nint main(void) {int fd[2];\n return pipe2(fd, 0);\n}\n" LWS_HAVE_PIPE2)
|
||||
|
||||
# old mbedtls has everything in mbedtls/net.h
|
||||
|
||||
CHECK_C_SOURCE_COMPILES("#include <mbedtls/net_sockets.h>\nint main(void) { return 0;}\n" LWS_HAVE_MBEDTLS_NET_SOCKETS)
|
||||
|
||||
# tcp keepalive needs this on linux to work practically... but it only exists
|
||||
# after kernel 2.6.37
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#cmakedefine LWS_HAVE_mbedtls_ssl_set_hs_ca_chain
|
||||
#cmakedefine LWS_HAVE_mbedtls_ssl_set_hs_own_cert
|
||||
#cmakedefine LWS_HAVE_mbedtls_ssl_set_hs_authmode
|
||||
#cmakedefine LWS_HAVE_MBEDTLS_NET_SOCKETS
|
||||
#cmakedefine LWS_HAVE_NEW_UV_VERSION_H
|
||||
#cmakedefine LWS_HAVE_OPENSSL_ECDH_H
|
||||
#cmakedefine LWS_HAVE_PIPE2
|
||||
|
|
|
@ -18,7 +18,11 @@
|
|||
|
||||
/* mbedtls include */
|
||||
#include "mbedtls/platform.h"
|
||||
#if defined(LWS_HAVE_MBEDTLS_NET_SOCKETS)
|
||||
#include "mbedtls/net_sockets.h"
|
||||
#else
|
||||
#include "mbedtls/net.h"
|
||||
#endif
|
||||
#include "mbedtls/debug.h"
|
||||
#include "mbedtls/entropy.h"
|
||||
#include "mbedtls/ctr_drbg.h"
|
||||
|
|
Loading…
Add table
Reference in a new issue