From: Kurt Roeckx Date: Tue, 3 Feb 2009 06:54:33 +0000 (+0100) Subject: lt_dlopenext sets error upon successful library load. X-Git-Tag: v2.2.7b~112 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a23b561d4497d6560e0cf9065201cb4f811836ff;p=thirdparty%2Flibtool.git lt_dlopenext sets error upon successful library load. * libltdl/ltdl.c (lt_dlopenadvise): Fix bogus error on successful loading of library with lt_dlopenext. Report by Kaiwang Chen in . Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index ab8db820b..a4b883c35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-02-03 Kurt Roeckx + + lt_dlopenext sets error upon successful library load. + * libltdl/ltdl.c (lt_dlopenadvise): Fix bogus error on + successful loading of library with lt_dlopenext. + Report by Kaiwang Chen in . + 2009-02-01 Ralf Wildenhues Fix sed script in install.at. diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 6e19599f8..80b56757a 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -1614,6 +1614,9 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise) { lt_dlhandle handle = 0; int errors = 0; + const char * saved_error = 0; + + LT__GETERROR (saved_error); /* Can't have symbols hidden and visible at the same time! */ if (advise && advise->is_symlocal && advise->is_symglobal) @@ -1650,6 +1653,7 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise) #if defined(LT_MODULE_EXT) /* Try appending SHLIB_EXT. */ + LT__SETERRORSTR (saved_error); errors = try_dlopen (&handle, filename, shlib_ext, advise); /* As before, if the file was found but loading failed, return now