From f3b06c771d0a210367aea046777232398d7ad49b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 8 Jan 2007 15:31:01 +0000 Subject: [PATCH] (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 --- lib/krb5/acache.c | 7 ++++++- lib/krb5/plugin.c | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/krb5/acache.c b/lib/krb5/acache.c index 15a52dde8..3fcb411bd 100644 --- a/lib/krb5/acache.c +++ b/lib/krb5/acache.c @@ -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); diff --git a/lib/krb5/plugin.c b/lib/krb5/plugin.c index 4ee2ffd0a..c8bd6dfd6 100644 --- a/lib/krb5/plugin.c +++ b/lib/krb5/plugin.c @@ -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",