curl: move to core packages
[openwrt.git] / package / network / utils / curl / patches / 001-cyassl-Use-error-ssl.h-when-available.patch
1 From 0204e17bc656e6c59b4010283e67f9251eb12c41 Mon Sep 17 00:00:00 2001
2 From: Dan Fandrich <dan@coneharvesters.com>
3 Date: Wed, 23 Apr 2014 11:01:30 +0200
4 Subject: [PATCH] cyassl: Use error-ssl.h when available
5
6 Versions since at least 2.9.4 renamed error.h to error-ssl.h, so use
7 whichever one is available.
8 ---
9  configure.ac      |    3 +++
10  lib/vtls/cyassl.c |    9 +++++++--
11  2 files changed, 10 insertions(+), 2 deletions(-)
12
13 --- a/configure.ac
14 +++ b/configure.ac
15 @@ -2003,6 +2003,9 @@ if test "$curl_ssl_msg" = "$init_ssl_msg
16        dnl cyassl/ctaocrypt/types.h needs SIZEOF_LONG_LONG defined!
17        AC_CHECK_SIZEOF(long long)
18  
19 +      dnl Versions since at least 2.9.4 renamed error.h to error-ssl.h
20 +      AC_CHECK_HEADERS(cyassl/error-ssl.h)
21 +
22        LIBS="-lcyassl -lm $LIBS"
23  
24        if test -n "$cyassllib"; then
25 --- a/lib/vtls/cyassl.c
26 +++ b/lib/vtls/cyassl.c
27 @@ -47,11 +47,16 @@
28  #define _MPRINTF_REPLACE /* use our functions only */
29  #include <curl/mprintf.h>
30  #include "curl_memory.h"
31 -/* The last #include file should be: */
32 -#include "memdebug.h"
33 +
34  #include <cyassl/ssl.h>
35 +#ifdef HAVE_CYASSL_ERROR_SSL_H
36 +#include <cyassl/error-ssl.h>
37 +#else
38  #include <cyassl/error.h>
39 +#endif
40  
41 +/* The last #include file should be: */
42 +#include "memdebug.h"
43  
44  static Curl_recv cyassl_recv;
45  static Curl_send cyassl_send;