[Libreoffice-commits] core.git: connectivity/source

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Thu May 14 13:48:26 UTC 2020


 connectivity/source/drivers/odbc/OFunctions.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 0967993f282713b04f509d13e09539e774e8da9a
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Thu May 14 14:45:09 2020 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Thu May 14 15:47:44 2020 +0200

    unixODBC changed soname to .2 so reflect it (connectivity)
    
    Synchronize with:
    https://cgit.freedesktop.org/libreoffice/core/commit/?id=3f5584526fd4e8290dac033e1cf3d64acd25d893
    author  Tomáš Chvátal <tchvatal at suse.com>       2017-01-05 16:06:10 +0100
    committer       Lionel Elie Mamane <lionel at mamane.lu>   2017-01-13 10:17:13 +0000
    commit  3f5584526fd4e8290dac033e1cf3d64acd25d893 (patch)
    tree    055eaf148ed60da5182e6033d7a74a387765f886
    parent  afe64b6f0ab839955690f07929268a3d389279bf (diff)
    unixODBC changed soname to .2 so reflect it
    we dlopen this library and thus we should be able to find it with any
    soname, so far .1 and .2 seem to be used.
    
    Also now the load order on linux is: .so.2 -> .so.1 -> .so
    
    Change-Id: I1b7a54992ee9a654d77d0ef443087178c99cffe6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94199
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
    Tested-by: Jenkins

diff --git a/connectivity/source/drivers/odbc/OFunctions.cxx b/connectivity/source/drivers/odbc/OFunctions.cxx
index be68fdfcfe56..ae89531763a1 100644
--- a/connectivity/source/drivers/odbc/OFunctions.cxx
+++ b/connectivity/source/drivers/odbc/OFunctions.cxx
@@ -97,10 +97,16 @@ bool LoadLibrary_ODBC3(OUString &_rPath)
  #ifdef MACOSX
     _rPath = "libiodbc.dylib";
  #else
-    _rPath = "libodbc.so.1";
+    _rPath = "libodbc.so.2";
     pODBCso = osl_loadModule( _rPath.pData,SAL_LOADMODULE_NOW );
+    if ( !pODBCso )
+    {
+        _rPath = "libodbc.so.1";
+        pODBCso = osl_loadModule( _rPath.pData,SAL_LOADMODULE_NOW );
+    }
     if ( !pODBCso )
         _rPath = "libodbc.so";
+
  #endif   /* MACOSX */
 #endif
 


More information about the Libreoffice-commits mailing list