aboutsummaryrefslogtreecommitdiff
path: root/lib/ldap.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2004-12-14 20:44:36 +0000
committerDan Fandrich <dan@coneharvesters.com>2004-12-14 20:44:36 +0000
commitf23d923fd380933e060d4d3df9695669ed9982d0 (patch)
tree7d27e86bc55df8da31682275693ebba415ce718d /lib/ldap.c
parent10d6d8b2ae93489d282dbf55b94b9150f4711388 (diff)
Only declare static variables if they're needed. Fixed some compile warnings.
Diffstat (limited to 'lib/ldap.c')
-rw-r--r--lib/ldap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ldap.c b/lib/ldap.c
index c6f7e5490..5646baee8 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -107,10 +107,12 @@ typedef void * (*dynafunc)(void *input);
/***********************************************************************
*/
+#if defined(HAVE_DLOPEN) || defined(HAVE_LIBDL) || defined(WIN32)
static void *libldap = NULL;
#ifndef WIN32
static void *liblber = NULL;
#endif
+#endif
static int DynaOpen(const char **mod_name)
{
@@ -140,6 +142,7 @@ static int DynaOpen(const char **mod_name)
return (libldap != NULL);
#else
+ (void) mod_name;
return (0);
#endif
}
@@ -179,6 +182,8 @@ static dynafunc DynaGetFunction(const char *name)
if (libldap) {
func = (dynafunc)GetProcAddress((HINSTANCE)libldap, name);
}
+#else
+ (void) name;
#endif
return func;
}