]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
lt_dlopenext sets error upon successful library load.
authorKurt Roeckx <kurt@roeckx.be>
Tue, 3 Feb 2009 06:54:33 +0000 (07:54 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 3 Feb 2009 07:02:23 +0000 (08:02 +0100)
* libltdl/ltdl.c (lt_dlopenadvise): Fix bogus error on
successful loading of library with lt_dlopenext.
Report by Kaiwang Chen in <http://bugs.debian.org/510006>.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
libltdl/ltdl.c

index ab8db820b8bb13fd7a133d4978a6fcab65833c3b..a4b883c356960817fac80cf3b6df9ba65fc1c415 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-03  Kurt Roeckx <kurt@roeckx.be>
+
+       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 <http://bugs.debian.org/510006>.
+
 2009-02-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Fix sed script in install.at.
index 6e19599f830960f82fba4fa18f48b8677cc38fe7..80b56757ab2cfa95fa03e3e254b441b2055b784c 100644 (file)
@@ -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