summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitInit.h5
-rw-r--r--libreofficekit/qa/unit/tiledrendering.cxx8
2 files changed, 8 insertions, 5 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h
index a1b2ddc03d03..f1e513e213fc 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -45,12 +45,9 @@ extern "C"
void *lok_loadlib(const char *pFN)
{
return dlopen(pFN, RTLD_LAZY
-#if defined __clang__ && defined __linux__ \
- && defined ENABLE_RUNTIME_OPTIMIZATIONS
-#if !ENABLE_RUNTIME_OPTIMIZATIONS
+#if defined LOK_LOADLIB_GLOBAL
| RTLD_GLOBAL
#endif
-#endif
);
}
diff --git a/libreofficekit/qa/unit/tiledrendering.cxx b/libreofficekit/qa/unit/tiledrendering.cxx
index e28fece0d8cb..1df2eff37f54 100644
--- a/libreofficekit/qa/unit/tiledrendering.cxx
+++ b/libreofficekit/qa/unit/tiledrendering.cxx
@@ -19,8 +19,14 @@
#include <osl/file.hxx>
#include <rtl/bootstrap.hxx>
+#if defined __clang__ && defined __linux__
+#include <cxxabi.h>
#include <config_options.h>
- // see use of ENABLE_RUNTIME_OPTIMIZATIONS in LibreOfficeKintInit.h
+#if defined _LIBCPPABI_VERSION || !ENABLE_RUNTIME_OPTIMIZATIONS
+#define LOK_LOADLIB_GLOBAL
+#endif
+#endif
+
#include <LibreOfficeKit/LibreOfficeKitInit.h>
#include <LibreOfficeKit/LibreOfficeKit.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>