From 0967993f282713b04f509d13e09539e774e8da9a Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Thu, 14 May 2020 14:45:09 +0200 Subject: unixODBC changed soname to .2 so reflect it (connectivity) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Synchronize with: https://cgit.freedesktop.org/libreoffice/core/commit/?id=3f5584526fd4e8290dac033e1cf3d64acd25d893 author Tomáš Chvátal 2017-01-05 16:06:10 +0100 committer Lionel Elie Mamane 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 Tested-by: Jenkins --- connectivity/source/drivers/odbc/OFunctions.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'connectivity/source/drivers') 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 -- cgit v1.2.3