From aa834a8d4c8c260747264bc1daadc0a1eaafc2e7 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 19 Aug 2024 13:00:30 -0700 Subject: [PATCH 1/2] Delete workaround for classic zlib --- src/native/libs/System.IO.Compression.Native/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt index 7fa92062d8e5b0..f7e13f8012db31 100644 --- a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt +++ b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt @@ -46,10 +46,6 @@ if (CLR_CMAKE_TARGET_UNIX OR CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI) # Disable implicit fallthrough warning for Zlib and Brotli set(FLAGS -Wno-implicit-fallthrough) - # Disable no strict prototypes warning for Zlib - # https://github.com/madler/zlib/issues/633 - set(FLAGS "${FLAGS} -Wno-strict-prototypes") - # Delete this suppression once brotli is upgraded to vNext (current latest v1.0.9 # does not contain upstream fix: https://github.com/google/brotli/commit/0a3944c) if (NOT CLR_CMAKE_TARGET_WASI) From 7cf7435bbbd0d4889a09d5474d4f28db56e3c5ed Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 19 Aug 2024 17:05:03 -0700 Subject: [PATCH 2/2] Fix build breaks --- .../System.IO.Compression.Native/zlib_allocator_unix.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/native/libs/System.IO.Compression.Native/zlib_allocator_unix.c b/src/native/libs/System.IO.Compression.Native/zlib_allocator_unix.c index b2c898f70a4e36..38638d61585264 100644 --- a/src/native/libs/System.IO.Compression.Native/zlib_allocator_unix.c +++ b/src/native/libs/System.IO.Compression.Native/zlib_allocator_unix.c @@ -73,10 +73,7 @@ static void WriteAllocCookieUnaligned(void* pDest, DOTNET_ALLOC_COOKIE vCookie) const size_t DOTNET_ALLOC_HEADER_COOKIE_SIZE_WITH_PADDING = (sizeof(DOTNET_ALLOC_COOKIE) + MEMORY_ALLOCATION_ALIGNMENT - 1) & ~((size_t)MEMORY_ALLOCATION_ALIGNMENT - 1); const size_t DOTNET_ALLOC_TRAILER_COOKIE_SIZE = sizeof(DOTNET_ALLOC_COOKIE); -voidpf z_custom_calloc(opaque, items, size) - voidpf opaque; - unsigned items; - unsigned size; +voidpf z_custom_calloc(voidpf opaque, unsigned items, unsigned size) { (void)opaque; // unreferenced formal parameter @@ -122,9 +119,7 @@ static void zcfree_trash_cookie(void* pCookie) memset(pCookie, 0, sizeof(DOTNET_ALLOC_COOKIE)); } -void z_custom_cfree(opaque, ptr) - voidpf opaque; - voidpf ptr; +void z_custom_cfree(voidpf opaque, voidpf ptr) { (void)opaque; // unreferenced formal parameter