--- Modules.orig/options.c	2009-10-30 14:20:47.000000000 +0100
+++ Modules/options.c	2009-11-03 10:11:38.000000000 +0100
@@ -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
