diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-02 11:14:19 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-02 18:38:55 +0100 |
commit | 0cffcf74a17449da56fb75557c7da1e1f6c5e94e (patch) | |
tree | d8c7e9a4ac434e02cc4184b0ce520e6cb3dda0c1 /external | |
parent | 0db58e76d4055a21f4945e86d4cd80797d284075 (diff) |
external/firebird: Fix checks for null HANDLE in Windows-only code
Change-Id: I428bbdae91eaf69df43ae054a95e8da3fb1aa7dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107056
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/firebird/0001-Fix-checks-for-null-HANDLE-in-Windows-only-code.patch.1 | 41 | ||||
-rw-r--r-- | external/firebird/UnpackedTarball_firebird.mk | 6 |
2 files changed, 46 insertions, 1 deletions
diff --git a/external/firebird/0001-Fix-checks-for-null-HANDLE-in-Windows-only-code.patch.1 b/external/firebird/0001-Fix-checks-for-null-HANDLE-in-Windows-only-code.patch.1 new file mode 100644 index 000000000000..22cc1e119a32 --- /dev/null +++ b/external/firebird/0001-Fix-checks-for-null-HANDLE-in-Windows-only-code.patch.1 @@ -0,0 +1,41 @@ +From f4c0aa3ba070e5c3ce996b33a31323a3a6820f0c Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann <sbergman@redhat.com> +Date: Wed, 2 Dec 2020 10:44:28 +0100 +Subject: Fix checks for null HANDLE in Windows-only code + +clang-cl failed with "error: unordered comparison between pointer and zero +('HANDLE' (aka 'void *') and 'int')" in these two places introduced with +f219283b72ab537c2b5938222708f35227c1ebde "Sub-task CORE-4463: Windows +implementation for CORE-4462 (Make it possible to restore compressed .nbk files +without explicitly decompressing them)" and +c2cfa7824189ed7c3e5a19721effdf97c07dadfd "Prevent child process hung if it +writes too much data to the pipe and overflow the pipe buffer". +--- + src/utilities/nbackup/nbackup.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/utilities/nbackup/nbackup.cpp b/src/utilities/nbackup/nbackup.cpp +index 6598b6e331..4703079d67 100644 +--- a/src/utilities/nbackup/nbackup.cpp ++++ b/src/utilities/nbackup/nbackup.cpp +@@ -385,7 +385,7 @@ FB_SIZE_T NBackup::read_file(FILE_HANDLE &file, void *buffer, FB_SIZE_T bufsize) + #ifdef WIN_NT + // Read child's stderr often to prevent child process hung if it writes + // too much data to the pipe and overflow the pipe buffer. +- const bool checkChild = (childStdErr > 0 && file == backup); ++ const bool checkChild = (childStdErr != 0 && file == backup); + if (checkChild) + print_child_stderr(); + +@@ -790,7 +790,7 @@ void NBackup::close_backup() + return; + #ifdef WIN_NT + CloseHandle(backup); +- if (childId > 0) ++ if (childId != 0) + { + const bool killed = (WaitForSingleObject(childId, 5000) != WAIT_OBJECT_0); + if (killed) +-- +2.28.0 + diff --git a/external/firebird/UnpackedTarball_firebird.mk b/external/firebird/UnpackedTarball_firebird.mk index 27f4bfad36a5..57df8ca6d957 100644 --- a/external/firebird/UnpackedTarball_firebird.mk +++ b/external/firebird/UnpackedTarball_firebird.mk @@ -20,7 +20,10 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,firebird,\ # * external/firebird/0001-Make-comparison-operator-member-functions-const.patch.1 is upstream at # <https://github.com/FirebirdSQL/firebird/pull/227> "Make comparison operator member functions -# const": +# const"; +# * external/firebird/0001-Fix-checks-for-null-HANDLE-in-Windows-only-code.patch.1 is upstream at +# <https://github.com/FirebirdSQL/firebird/pull/301> "Fix checks for null HANDLE in Windows-only +# code": $(eval $(call gb_UnpackedTarball_add_patches,firebird,\ external/firebird/firebird.disable-ib-util-not-found.patch.1 \ external/firebird/firebird-Engine12.patch \ @@ -35,6 +38,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\ external/firebird/macos-arm64.patch.0 \ external/firebird/firebird-btyacc-add-explicit-rule.patch \ external/firebird/firebird-307.patch.1 \ + external/firebird/0001-Fix-checks-for-null-HANDLE-in-Windows-only-code.patch.1 \ )) ifeq ($(OS),WNT) |