changeset 4619:2bf1d3a772e3

workaround for mbed TLS 2.3.0 include problem reported by Nick Warne http://lists.dillo.org/pipermail/dillo-dev/2016-July/010941.html checking mbedtls/ssl.h usability... no checking mbedtls/ssl.h presence... yes configure: WARNING: mbedtls/ssl.h: present but cannot be compiled configure: WARNING: mbedtls/ssl.h: check for missing prerequisite headers? configure: WARNING: mbedtls/ssl.h: see the Autoconf documentation configure: WARNING: mbedtls/ssl.h: section "Present But Cannot Be Compiled" configure: WARNING: mbedtls/ssl.h: proceeding with the compiler's result checking for mbedtls/ssl.h... no configure: WARNING: *** mbed TLS 2 not found. Disabling SSL/HTTPS/TLS support. ***
author corvid
date So, 03 Jul 2016 21:34:10 +0000
parents 8dedbcb54a36
children a0615094111d 78aeb8eae728
files configure.ac src/IO/tls.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	So Jul 03 17:39:42 2016 +0000
+++ b/configure.ac	So Jul 03 21:34:10 2016 +0000
@@ -294,7 +294,9 @@
 dnl --------------------------
 dnl
 if test "x$enable_ssl" = "xyes"; then
-  AC_CHECK_HEADER(mbedtls/ssl.h, ssl_ok=yes, ssl_ok=no)
+  AC_CHECK_HEADER(mbedtls/ssl.h, ssl_ok=yes, ssl_ok=no,
+                  [#include <mbedtls/platform.h>])
+dnl In mbed TLS 2.3.0, ssl.h needs platform.h but fails to include it.
 
   if test "x$ssl_ok" = "xyes"; then
     old_libs="$LIBS"
--- a/src/IO/tls.c	So Jul 03 17:39:42 2016 +0000
+++ b/src/IO/tls.c	So Jul 03 21:34:10 2016 +0000
@@ -42,6 +42,7 @@
 #include "tls.h"
 #include "Url.h"
 
+#include <mbedtls/platform.h>  /* WORKAROUND: mbed TLS 2.3.0 ssl.h needs it */
 #include <mbedtls/ssl.h>
 #include <mbedtls/ctr_drbg.h>  /* random number generator */
 #include <mbedtls/entropy.h>