Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated zstd to 1.5.5 #1617

Merged
merged 7 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions zstd_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ find_package(ament_cmake REQUIRED)
find_package(ament_cmake_vendor_package REQUIRED)

list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
# We need at least VERSION 1.4.8, version check is done in Findzstd.cmake
find_package(zstd 1.4.8 QUIET)
# We need at least VERSION 1.5.5, version check is done in Findzstd.cmake
find_package(zstd 1.5.5 QUIET)

ament_vendor(zstd_vendor
SATISFIED ${zstd_FOUND}
VCS_URL https://github.com/facebook/zstd.git
VCS_VERSION v1.4.8
VCS_VERSION v1.5.5
SOURCE_SUBDIR build/cmake
CMAKE_ARGS
-DZSTD_BUILD_STATIC:BOOL=OFF
-DZSTD_BUILD_SHARED:BOOL=ON
-DZSTD_BUILD_PROGRAMS:BOOL=OFF
PATCHES patches
)

install(DIRECTORY cmake DESTINATION share/${PROJECT_NAME})
Expand Down
1 change: 1 addition & 0 deletions zstd_vendor/patches/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.patch text eol=lf
23 changes: 23 additions & 0 deletions zstd_vendor/patches/0001.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/lib/legacy/zstd_v04.c b/lib/legacy/zstd_v04.c
index 57be832b..cc4d3c2b 100644
--- a/lib/legacy/zstd_v04.c
+++ b/lib/legacy/zstd_v04.c
@@ -3545,10 +3545,15 @@ static size_t ZBUFF_decompressContinue(ZBUFF_DCtx* zbc, void* dst, size_t* maxDs
unsigned ZBUFFv04_isError(size_t errorCode) { return ERR_isError(errorCode); }
const char* ZBUFFv04_getErrorName(size_t errorCode) { return ERR_getErrorName(errorCode); }

-size_t ZBUFFv04_recommendedDInSize() { return BLOCKSIZE + 3; }
-size_t ZBUFFv04_recommendedDOutSize() { return BLOCKSIZE; }
-
+size_t ZBUFFv04_recommendedDInSize(void)
+{
+ return BLOCKSIZE + 3;
+}

+size_t ZBUFFv04_recommendedDOutSize(void)
+{
+ return BLOCKSIZE;
+}

/*- ========================================================================= -*/

Loading