This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 8ae493e54fee4f9fbd58c71fa273c401341e1216
Author: HappenLee <happen...@hotmail.com>
AuthorDate: Mon Mar 11 21:30:35 2024 +0800

    [thirdparty](lib) Add Patch for base64 lib (#32059)
---
 thirdparty/download-thirdparty.sh     | 22 ++++++++++++++
 thirdparty/patches/base64-0.5.2.patch | 57 +++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+)

diff --git a/thirdparty/download-thirdparty.sh 
b/thirdparty/download-thirdparty.sh
index 4dfa838e8b4..6965a96a112 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -399,3 +399,25 @@ if [[ "${BRPC_SOURCE}" == 'brpc-1.4.0' ]]; then
     cd -
 fi
 echo "Finished patching ${BRPC_SOURCE}"
+
+# patch ali sdk
+if [[ "${ALI_SDK_SOURCE}" = "aliyun-openapi-cpp-sdk-1.36.1586" ]]; then
+    cd "${TP_SOURCE_DIR}/${ALI_SDK_SOURCE}"
+    if [[ ! -f "${PATCHED_MARK}" ]]; then
+        patch -p1 <"${TP_PATCH_DIR}/ali-sdk-1.36.1586.patch"
+        touch "${PATCHED_MARK}"
+    fi
+    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 <happen...@hotmail.com>
+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: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to