[launch-darkly-server] Fix dependence clib symbol Duplicate with openssl (#35901)

This commit is contained in:
Frank 2024-01-05 04:04:24 +08:00 committed by GitHub
parent baa9580d7d
commit b88e4cdec5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 49 additions and 2 deletions

View File

@ -0,0 +1,26 @@
diff --git a/sha1.c b/sha1.c
index fe8da83..53ad2c4 100644
--- a/sha1.c
+++ b/sha1.c
@@ -279,7 +279,7 @@ void SHA1Final(
memset(&finalcount, '\0', sizeof(finalcount));
}
-void SHA1(
+void SHA1_CLIBS(
char *hash_out,
const char *str,
int len)
diff --git a/sha1.h b/sha1.h
index 96bb008..53c4b01 100644
--- a/sha1.h
+++ b/sha1.h
@@ -36,7 +36,7 @@ void SHA1Final(
SHA1_CTX * context
);
-void SHA1(
+void SHA1_CLIBS(
char *hash_out,
const char *str,
int len);

View File

@ -0,0 +1,13 @@
diff --git a/src/evaluate.c b/src/evaluate.c
index f702419..e80fa6c 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -1246,7 +1246,7 @@ LDi_bucketUser(
char digest[21], encoded[17];
const float longScale = 1152921504606846975.0;
- SHA1(digest, raw, strlen(raw));
+ SHA1_CLIBS(digest, raw, strlen(raw));
/* encodes to hex, and shortens, 16 characters in hex 8 bytes */
status = hexify(

View File

@ -8,6 +8,7 @@ vcpkg_from_github(
findPCRE.patch
FixStrictPrototypes.patch # required with clang-15
removeWarningAsError.patch
fix-depend-clib.patch
)
@ -37,6 +38,8 @@ vcpkg_from_github(
REF fa1d96ec293d2968791603548125e3274bd6b472
SHA512 fd7dfbed4ac10e2c482da1cd460dabf0a53965e6fa17fab97156becb8214e435ee3605b2748705141380e254de7c32ab42da5e42cd6e4494f7ecaafb3b9e19f0
HEAD_REF master
PATCHES
fix-confilct-with-openssl.patch
)
vcpkg_from_github(

View File

@ -1,7 +1,7 @@
{
"name": "launch-darkly-server",
"version": "2.8.6",
"port-version": 1,
"port-version": 2,
"description": "LaunchDarkly server-side SDK for C/C++",
"homepage": "https://github.com/launchdarkly/c-server-sdk",
"license": "Apache-2.0",

View File

@ -3994,7 +3994,7 @@
},
"launch-darkly-server": {
"baseline": "2.8.6",
"port-version": 1
"port-version": 2
},
"lazy-importer": {
"baseline": "2023-08-03",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "cf4d27e890d7becddd87f89a3a0622199892ebd2",
"version": "2.8.6",
"port-version": 2
},
{
"git-tree": "d2e41e5748cc5b77167205b83be64003e979e637",
"version": "2.8.6",