(loadlib): pass RTLD_LAZY to dlopen, without it linux is unhappy.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19764 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-01-08 15:31:01 +00:00
parent b0f21e1a0e
commit f3b06c771d
2 changed files with 11 additions and 2 deletions

View File

@@ -106,7 +106,12 @@ init_ccapi(krb5_context context)
}
#ifdef HAVE_DLOPEN
cc_handle = dlopen(lib, 0);
#ifndef RTLD_LAZY
#define RTLD_LAZY 0
#endif
cc_handle = dlopen(lib, RTLD_LAZY);
if (cc_handle == NULL) {
HEIMDAL_MUTEX_unlock(&acc_mutex);
krb5_set_error_string(context, "Failed to load %s", lib);

View File

@@ -89,7 +89,11 @@ loadlib(krb5_context context,
return ENOMEM;
}
(*e)->dsohandle = dlopen(lib, 0);
#ifndef RTLD_LAZY
#define RTLD_LAZY 0
#endif
(*e)->dsohandle = dlopen(lib, RTLD_LAZY);
if ((*e)->dsohandle == NULL) {
free(*e);
krb5_set_error_string(context, "Failed to load %s: %s",