external/zlib/UnpackedTarball_zlib.mk | 4 +++ external/zlib/missinginclude.patch | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+)
New commits: commit 885538d308e49a10eb67e0b6f23f3acc0a91d1e2 Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Sun Dec 10 22:18:45 2023 +0100 Commit: Stephan Bergmann <stephan.bergm...@allotropia.de> CommitDate: Mon Dec 11 16:45:48 2023 +0100 -Wimplicit-function-declaration > workdir/UnpackedTarball/zlib/gzlib.c:242:9: error: call to undeclared function 'lseek'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > 242 | LSEEK(state->fd, 0, SEEK_END); /* so gzoffset() is correct */ > | ^ etc., as causing an error now by default with Clang 18 trunk Change-Id: Ic19c5710357a1f65046b5a225c6a181c3046938c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160554 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de> diff --git a/external/zlib/UnpackedTarball_zlib.mk b/external/zlib/UnpackedTarball_zlib.mk index dd9fc1c31445..5149063f456d 100644 --- a/external/zlib/UnpackedTarball_zlib.mk +++ b/external/zlib/UnpackedTarball_zlib.mk @@ -18,4 +18,8 @@ $(eval $(call gb_UnpackedTarball_set_post_action,zlib,\ $(eval $(call gb_UnpackedTarball_set_patchlevel,zlib,0)) +$(eval $(call gb_UnpackedTarball_add_patches,zlib, \ + external/zlib/missinginclude.patch \ +)) + # vim: set noet sw=4 ts=4: diff --git a/external/zlib/missinginclude.patch b/external/zlib/missinginclude.patch new file mode 100644 index 000000000000..91a63288bbf1 --- /dev/null +++ b/external/zlib/missinginclude.patch @@ -0,0 +1,36 @@ +--- gzlib.c ++++ gzlib.c +@@ -3,6 +3,9 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + ++#if !defined _WIN32 ++#include <unistd.h> ++#endif + #include "gzguts.h" + + #if defined(_WIN32) && !defined(__BORLANDC__) +--- gzread.c ++++ gzread.c +@@ -3,6 +3,9 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + ++#if !defined _WIN32 ++#include <unistd.h> ++#endif + #include "gzguts.h" + + /* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from +--- gzwrite.c ++++ gzwrite.c +@@ -3,6 +3,9 @@ + * For conditions of distribution and use, see copyright notice in zlib.h + */ + ++#if !defined _WIN32 ++#include <unistd.h> ++#endif + #include "gzguts.h" + + /* Initialize state for writing a gzip file. Mark initialization by setting