diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2023-02-24 10:30:50 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2023-02-24 17:05:43 +0000 |
commit | 1786ddbde4b44575321aa6b9d9d367a964969063 (patch) | |
tree | e319a7f54e93fba1ac11c7e41e85d9fb042ef68e /basic/qa/cppunit | |
parent | ae51dfb2379a9e9183afa9a1e5ee4fe4f4f0f7ef (diff) |
Fix build in a specific VS2022 environment
Building CppunitTest_basic_macros using VS2022 failed for me reproducibly
for some time, with
make[1]: *** [C:/lo/src/core/solenv/gbuild/LinkTarget.mk:841: C:/lo/src/build/workdir/LinkTarget/CppunitTest/test_basic_macros.dll] Error 139
It is caused by linking odbccp32, and legacy_stdio_definitions required
by the latter with current versions of UCRT.
It seems to work OK for others; but being unable to find what's different
on my system, I have this workaround, using run-time loading instead.
Change-Id: Ic4094398f7510bc281dfa96f980f29f12f09d7ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147626
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basic/qa/cppunit')
-rw-r--r-- | basic/qa/cppunit/test_vba.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx index f048fee6dfda..b778d393019b 100644 --- a/basic/qa/cppunit/test_vba.cxx +++ b/basic/qa/cppunit/test_vba.cxx @@ -14,11 +14,7 @@ #include <comphelper/processfactory.hxx> #include <o3tl/char16_t2wchar_t.hxx> -#if !defined WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -#endif -#include <windows.h> -#include <odbcinst.h> +#include <systools/win32/odbccp32.hxx> #endif using namespace ::com::sun::star; @@ -211,7 +207,8 @@ void VBATest::testMiscOLEStuff() const int nBufSize = 1024 * 4; wchar_t sBuf[nBufSize]; - SQLGetInstalledDriversW( sBuf, nBufSize, nullptr ); + if (!sal::systools::odbccp32().SQLGetInstalledDrivers(sBuf, nBufSize)) + return; const wchar_t *pODBCDriverName = sBuf; bool bFound = false; |