]> granicus.if.org Git - curl/commitdiff
cyassl: Use error-ssl.h when available
authorDan Fandrich <dan@coneharvesters.com>
Wed, 23 Apr 2014 09:01:30 +0000 (11:01 +0200)
committerDan Fandrich <dan@coneharvesters.com>
Wed, 23 Apr 2014 09:01:30 +0000 (11:01 +0200)
Versions since at least 2.9.4 renamed error.h to error-ssl.h, so use
whichever one is available.

configure.ac
lib/vtls/cyassl.c

index 0874d2e0322437a188de717a334ac4e52f09b09e..e0f7f739c2a6a6a07f33939a8e93aa04040417ea 100644 (file)
@@ -2003,6 +2003,9 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
       dnl cyassl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined!
       AC_CHECK_SIZEOF(long long)
 
+      dnl Versions since at least 2.9.4 renamed error.h to error-ssl.h
+      AC_CHECK_HEADERS(cyassl/error-ssl.h)
+
       LIBS="-lcyassl -lm $LIBS"
 
       if test -n "$cyassllib"; then
index 6f1cea233dca5ba59ad881266339b6a8ce2b6481..cf93e0ede512f758c8536415a7dee9c65eb876c5 100644 (file)
 #define _MPRINTF_REPLACE /* use our functions only */
 #include <curl/mprintf.h>
 #include "curl_memory.h"
-/* The last #include file should be: */
-#include "memdebug.h"
+
 #include <cyassl/ssl.h>
+#ifdef HAVE_CYASSL_ERROR_SSL_H
+#include <cyassl/error-ssl.h>
+#else
 #include <cyassl/error.h>
+#endif
 
+/* The last #include file should be: */
+#include "memdebug.h"
 
 static Curl_recv cyassl_recv;
 static Curl_send cyassl_send;