[hiredis] Fix the conflict of macro ssize_t (#25271)

This commit is contained in:
Jack·Boos·Yu 2022-07-14 01:29:41 +00:00 committed by GitHub
parent 26ba6f56c1
commit 8b14e7e872
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 3 deletions

View File

@ -33,11 +33,24 @@ vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_cmake_config_fixup()
if("ssl" IN_LIST FEATURES)
vcpkg_cmake_config_fixup(PACKAGE_NAME hiredis_ssl CONFIG_PATH share/hiredis_ssl)
endif()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/hiredis/hiredis.h"
[[typedef long long ssize_t;
#define _SSIZE_T_ /* for compatibility with libuv */]]
[[typedef intptr_t ssize_t;]]
)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/hiredis/sds.h"
[[typedef long long ssize_t;
#define SSIZE_MAX (LLONG_MAX >> 1)]]
[[typedef intptr_t ssize_t;
#define SSIZE_MAX INTPTR_MAX]]
)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,9 +1,10 @@
{
"name": "hiredis",
"version": "1.0.2",
"port-version": 3,
"port-version": 4,
"description": "Hiredis is a minimalistic C client library for the Redis database.",
"homepage": "https://github.com/redis/hiredis",
"license": "BSD-3-Clause",
"dependencies": [
{
"name": "vcpkg-cmake",

View File

@ -2822,7 +2822,7 @@
},
"hiredis": {
"baseline": "1.0.2",
"port-version": 3
"port-version": 4
},
"hps": {
"baseline": "2022-01-18",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "448374fa990c04aa7964508d32817a6d7868600b",
"version": "1.0.2",
"port-version": 4
},
{
"git-tree": "4eafe5d23a2d906153cc8821c14092f2a9d3ef8a",
"version": "1.0.2",