The following patch allows the LDAP_OPT_X_TLS_PROTOCOL_MIN to work with
libldap2-dev 2.4.9-0ubuntu0

Thanks,
Chris Dukes
Only in python-ldap/build: bdist.linux-i686
Only in python-ldap/build/lib.linux-i686-2.5: _ldap.so
Only in python-ldap: dist
Only in python-ldap/Lib/python_ldap.egg-info: native_libs.txt
diff -urwp python-ldap.orig/Modules/constants.c python-ldap/Modules/constants.c
--- python-ldap.orig/Modules/constants.c	2009-09-15 09:29:53.000000000 -0400
+++ python-ldap/Modules/constants.c	2009-10-22 13:09:50.000000000 -0400
@@ -182,8 +182,10 @@ LDAPinit_constants( PyObject* d )
 	add_int(d,OPT_X_TLS_CRL_PEER);
 	add_int(d,OPT_X_TLS_CRL_ALL);
 	add_int(d,OPT_X_TLS_NEWCTX);
+#ifdef OPT_X_TLS_PROTOCOL_MIN
 	add_int(d,OPT_X_TLS_PROTOCOL_MIN);
 #endif
+#endif
 	add_int(d,OPT_X_SASL_MECH);
 	add_int(d,OPT_X_SASL_REALM);
 	add_int(d,OPT_X_SASL_AUTHCID);
diff -urwp python-ldap.orig/Modules/options.c python-ldap/Modules/options.c
--- python-ldap.orig/Modules/options.c	2009-09-14 19:07:43.000000000 -0400
+++ python-ldap/Modules/options.c	2009-10-22 13:10:10.000000000 -0400
@@ -80,8 +80,10 @@ LDAP_set_option(LDAPObject *self, int op
     case LDAP_OPT_X_TLS:
     case LDAP_OPT_X_TLS_REQUIRE_CERT:
     case LDAP_OPT_X_TLS_NEWCTX:
+#ifdef OPT_X_TLS_PROTOCOL_MIN
     case LDAP_OPT_X_TLS_PROTOCOL_MIN:
 #endif
+#endif
 #ifdef HAVE_SASL
     case LDAP_OPT_X_SASL_SSF_MIN:
     case LDAP_OPT_X_SASL_SSF_MAX:
@@ -216,8 +218,10 @@ LDAP_get_option(LDAPObject *self, int op
 #ifdef HAVE_TLS
     case LDAP_OPT_X_TLS:
     case LDAP_OPT_X_TLS_REQUIRE_CERT:
+#ifdef OPT_X_TLS_PROTOCOL_MIN
     case LDAP_OPT_X_TLS_PROTOCOL_MIN:
 #endif
+#endif
 #ifdef HAVE_SASL
     case LDAP_OPT_X_SASL_SSF_MIN:
     case LDAP_OPT_X_SASL_SSF_MAX:
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Python-LDAP-dev mailing list
Python-LDAP-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev

Reply via email to