From 8e4a1b8a993e8323f39dbc8f66a14ed0319259ad Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Wed, 25 Aug 2004 14:22:05 +0000 Subject: Hopefully fix Laszlo and Jacobs dlopen problem. --- ldso/libdl/libdl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ldso/libdl') diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c index d1274e3ff..6c4e9843b 100644 --- a/ldso/libdl/libdl.c +++ b/ldso/libdl/libdl.c @@ -179,8 +179,11 @@ void *dlopen(const char *libname, int flag) if(_dl_debug) fprintf(stderr, "Trying to dlopen '%s'\n", (char*)libname); #endif - if (!(tpnt = _dl_check_if_named_library_is_loaded((char *)libname, 0))) + tpnt = _dl_check_if_named_library_is_loaded((char *)libname, 0); + if (!(tpnt)) tpnt = _dl_load_shared_library(0, &rpnt, tfrom, (char*)libname, 0); + else + tpnt->usage_count++; if (tpnt == NULL) { _dl_unmap_cache(); return NULL; -- cgit v1.2.3