cURL / Mailing Lists / curl-library / Single Mail

curl-library

CyaSSL problem in ldap.c

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Wed, 13 Jun 2012 22:36:57 +0200

From gcc/MingW:

In file included from ../../CyaSSL-2.2.0/cyassl/openssl/ssl.h:31:0,
                 from urldata.h:115,
                 from ldap.c:68:
../../CyaSSL-2.2.0/cyassl/ssl.h:422:5: error: expected identifier before '(' token

Reason being that OCSP_REQUEST+OCSP_RESPONSE are enum values
in CyaSSL and defines in <wincrypt.h> included via <winldap.h> in ldap.c.
A fix is to #undef-ine them before ldap.c hits them again via urldata.h:

diff --git a/lib/urldata.h b/lib/urldata.h
index 20e339b..590d79a 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -112,6 +112,12 @@
 #endif

 #ifdef USE_CYASSL
+/*
+ * These are enum values in <cyassl/ssl.h> and defines in <wincrypt.h>
+ * included elsewhere (ldap.c).
+ */
+#undef OCSP_REQUEST
+#undef OCSP_RESPONSE
 #include <cyassl/openssl/ssl.h>
 #endif

--gv
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-06-13