Files
loongoffice/external/zlib/missinginclude.patch
Stephan Bergmann 885538d308 -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.bergmann@allotropia.de>
2023-12-11 16:45:48 +01:00

37 lines
795 B
Diff

--- 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