This is an automated email from the ASF dual-hosted git repository.
lihaopeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 4a18b3bd368 [thirdparty](lib) Add Patch for base64 lib (#32059)
4a18b3bd368 is described below
commit 4a18b3bd368392e4380cfca02bc3c0427e2fa08d
Author: HappenLee <[email protected]>
AuthorDate: Mon Mar 11 21:30:35 2024 +0800
[thirdparty](lib) Add Patch for base64 lib (#32059)
---
thirdparty/download-thirdparty.sh | 11 +++++++
thirdparty/patches/base64-0.5.2.patch | 57 +++++++++++++++++++++++++++++++++++
2 files changed, 68 insertions(+)
diff --git a/thirdparty/download-thirdparty.sh
b/thirdparty/download-thirdparty.sh
index 57f1ed1cabd..6965a96a112 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -410,3 +410,14 @@ if [[ "${ALI_SDK_SOURCE}" =
"aliyun-openapi-cpp-sdk-1.36.1586" ]]; then
cd -
fi
echo "Finished patching ${ALI_SDK_SOURCE}"
+
+# patch base64
+if [[ "${BASE64_SOURCE}" = "base64-0.5.2" ]]; then
+ cd "${TP_SOURCE_DIR}/${BASE64_SOURCE}"
+ if [[ ! -f "${PATCHED_MARK}" ]]; then
+ patch -p1 <"${TP_PATCH_DIR}/base64-0.5.2.patch"
+ touch "${PATCHED_MARK}"
+ fi
+ cd -
+fi
+echo "Finished patching ${BASE64_SOURCE}"
diff --git a/thirdparty/patches/base64-0.5.2.patch
b/thirdparty/patches/base64-0.5.2.patch
new file mode 100644
index 00000000000..ff70b789c83
--- /dev/null
+++ b/thirdparty/patches/base64-0.5.2.patch
@@ -0,0 +1,57 @@
+From a479a271d669c4f1410f65b6e11ffaf193067aca Mon Sep 17 00:00:00 2001
+From: HappenLee <[email protected]>
+Date: Mon, 11 Mar 2024 15:23:09 +0800
+Subject: [PATCH] change interface of the code
+
+---
+ include/libbase64.h | 4 ++--
+ lib/lib.c | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/include/libbase64.h b/include/libbase64.h
+index c590897..6fa24bd 100644
+--- a/include/libbase64.h
++++ b/include/libbase64.h
+@@ -66,7 +66,7 @@ struct base64_state {
+ * to *out without trailing zero. Output length in bytes is written to
*outlen.
+ * The buffer in `out` has been allocated by the caller and is at least 4/3
the
+ * size of the input. See above for `flags`; set to 0 for default operation:
*/
+-void BASE64_EXPORT base64_encode
++void BASE64_EXPORT do_base64_encode
+ ( const char *src
+ , size_t srclen
+ , char *out
+@@ -108,7 +108,7 @@ void BASE64_EXPORT base64_stream_encode_final
+ * to *out without trailing zero. Output length in bytes is written to
*outlen.
+ * The buffer in `out` has been allocated by the caller and is at least 3/4
the
+ * size of the input. See above for `flags`, set to 0 for default operation:
*/
+-int BASE64_EXPORT base64_decode
++int BASE64_EXPORT do_base64_decode
+ ( const char *src
+ , size_t srclen
+ , char *out
+diff --git a/lib/lib.c b/lib/lib.c
+index 053931a..ba6286a 100644
+--- a/lib/lib.c
++++ b/lib/lib.c
+@@ -100,7 +100,7 @@ base64_stream_decode
+ #endif
+
+ void
+-base64_encode
++do_base64_encode
+ ( const char *src
+ , size_t srclen
+ , char *out
+@@ -133,7 +133,7 @@ base64_encode
+ }
+
+ int
+-base64_decode
++do_base64_decode
+ ( const char *src
+ , size_t srclen
+ , char *out
+--
+2.31.1
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]