--- qtbase/config.tests/unix/openssl/openssl.cpp	2016-09-16 07:49:42.000000000 +0200
+++ qtbase/config.tests/unix/openssl/openssl.cpp	2016-10-21 19:05:10.099362793 +0200
@@ -39,7 +39,7 @@
 
 #include <openssl/ssl.h>
 
-#if OPENSSL_VERSION_NUMBER-0 >= 0x10002000L && !defined(OPENSSL_NO_EC) && !defined(SSL_CTRL_SET_CURVES)
+#if (OPENSSL_VERSION_NUMBER-0 >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER) && !defined(OPENSSL_NO_EC) && !defined(SSL_CTRL_SET_CURVES)
 #  error "OpenSSL was reported as >= 1.0.2 but is missing required features, possibly it's libressl which is unsupported"
 #endif
 
