external/freetype/StaticLibrary_freetype.mk | 5 +++++ include/LibreOfficeKit/LibreOfficeKitInit.h | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-)
New commits: commit e11f21a4d94e26c55b04ff98e275bea96b8dbde3 Author: Tor Lillqvist <[email protected]> AuthorDate: Mon Jul 14 21:02:29 2025 +0300 Commit: Tor Lillqvist <[email protected]> CommitDate: Tue Jan 13 14:03:30 2026 +0100 Don't even try to load a clearly bogus sofficeapp library If it is smaller than 1000 bytes it can't be real, it must be the dummy text file in the --enable-mergelibs case. Change-Id: Ib3a913830bf34dc1e17955626576e72f5f7cd2d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194592 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197104 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <[email protected]> diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h index f7fe24475902..1da63774976b 100644 --- a/include/LibreOfficeKit/LibreOfficeKitInit.h +++ b/include/LibreOfficeKit/LibreOfficeKitInit.h @@ -217,15 +217,13 @@ static void *lok_dlopen( const char *install_path, char ** _imp_lib ) imp_lib[partial_length++] = SEPARATOR; strncpy(imp_lib + partial_length, TARGET_LIB, imp_lib_size - partial_length); - dlhandle = lok_loadlib(imp_lib); - if (!dlhandle) + struct stat st; + // If TARGET_LUB exists but is ridiculously small, it is the + // one-line text stub as in the --enable-mergedlib case. + if (stat(imp_lib, &st) == 0 && st.st_size > 1000) { - // If TARGET_LIB exists, and likely is a real library (not a - // small one-line text stub as in the --enable-mergedlib - // case), but dlopen failed for some reason, don't try - // TARGET_MERGED_LIB. - struct stat st; - if (stat(imp_lib, &st) == 0 && st.st_size > 100) + dlhandle = lok_loadlib(imp_lib); + if (!dlhandle) { char *pErrMessage = lok_dlerror(); fprintf(stderr, "failed to open library '%s': %s ", @@ -234,7 +232,9 @@ static void *lok_dlopen( const char *install_path, char ** _imp_lib ) free(imp_lib); return NULL; } - + } + else + { strncpy(imp_lib + partial_length, TARGET_MERGED_LIB, imp_lib_size - partial_length); dlhandle = lok_loadlib(imp_lib); commit 8c6295036dbe23a56457beacd67a12fc2c65cba0 Author: Tor Lillqvist <[email protected]> AuthorDate: Tue Mar 11 07:55:56 2025 +0200 Commit: Tor Lillqvist <[email protected]> CommitDate: Tue Jan 13 14:03:18 2026 +0100 Avoid MSVC warnings in freetype (needed in a --enable-headless build) Also make the "dlg" thing internal to freetype. Change-Id: I525c6dfdbf60ea7b464d8ddb4d765865ca94180d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194581 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197100 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <[email protected]> diff --git a/external/freetype/StaticLibrary_freetype.mk b/external/freetype/StaticLibrary_freetype.mk index 0e15b51f2ff2..c39fd5d011ed 100644 --- a/external/freetype/StaticLibrary_freetype.mk +++ b/external/freetype/StaticLibrary_freetype.mk @@ -18,7 +18,12 @@ $(eval $(call gb_StaticLibrary_set_include,freetype,\ $$(INCLUDE) \ )) +# Ignore warnings, warnings in this code is not our problem, or is it? + +$(eval $(call gb_StaticLibrary_set_warnings_disabled,freetype)) + $(eval $(call gb_StaticLibrary_add_defs,freetype,\ + -DDLG_STATIC \ -DZ_PREFIX \ -DFT2_BUILD_LIBRARY \ -DFT_DEBUG_LOGGING \
