Zhang Huangbin wrote:
I got below compile error on Red Hat Enterprise Linux 5.3 (x86_64)
with python-ldap-2.3.10, but 2.3.8 was compiled and installed success.
What's wrong with it?
Modules/constants.c:184: error: ‘LDAP_OPT_X_TLS_NEWCTX’ undeclared
Well, I asked for testing long *before* releasing 2.3.10...
This is because of older OpenLDAP libs. Try the patch below. It's also in HEAD
now.
Ciao, Michael.
Index: Modules/constants.c
===
RCS file: /cvsroot/python-ldap/python-ldap/Modules/constants.c,v
retrieving revision 1.43
diff -u -r1.43 constants.c
--- Modules/constants.c 23 Oct 2009 09:09:37 - 1.43
+++ Modules/constants.c 4 Nov 2009 15:48:04 -
@@ -162,7 +162,9 @@
add_int(d,OPT_URI);
#ifdef HAVE_TLS
add_int(d,OPT_X_TLS);
+#ifdef LDAP_OPT_X_TLS_NEWCTX
add_int(d,OPT_X_TLS_CTX);
+#endif
add_int(d,OPT_X_TLS_CACERTFILE);
add_int(d,OPT_X_TLS_CACERTDIR);
add_int(d,OPT_X_TLS_CERTFILE);
Index: Modules/options.c
===
RCS file: /cvsroot/python-ldap/python-ldap/Modules/options.c,v
retrieving revision 1.33
diff -u -r1.33 options.c
--- Modules/options.c 23 Oct 2009 09:09:37 - 1.33
+++ Modules/options.c 4 Nov 2009 15:48:04 -
@@ -79,7 +79,9 @@
#ifdef HAVE_TLS
case LDAP_OPT_X_TLS:
case LDAP_OPT_X_TLS_REQUIRE_CERT:
+#ifdef LDAP_OPT_X_TLS_NEWCTX
case LDAP_OPT_X_TLS_NEWCTX:
+#endif
#ifdef OPT_X_TLS_PROTOCOL_MIN
case LDAP_OPT_X_TLS_PROTOCOL_MIN:
#endif
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
___
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev