From 04866fd06d826c9eab443a0f0685e750875053b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jaramago=20Fern=C3=A1ndez?= Date: Fri, 22 Mar 2024 19:35:22 +0100 Subject: [PATCH] Fix 'sqlite3_pass_exts' patch compilation on Centos 7 --- deps/sqlite3/sqlite3_pass_exts.patch | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/deps/sqlite3/sqlite3_pass_exts.patch b/deps/sqlite3/sqlite3_pass_exts.patch index 6eac71ce0d..467a363616 100644 --- a/deps/sqlite3/sqlite3_pass_exts.patch +++ b/deps/sqlite3/sqlite3_pass_exts.patch @@ -1,6 +1,6 @@ ---- sqlite3.c 2024-03-22 13:17:43.208309942 +0100 -+++ sqlite3-pass-exts.c 2024-03-22 14:00:40.091425564 +0100 -@@ -25168,6 +25168,180 @@ +--- sqlite3.c 2024-03-22 19:22:47.046093173 +0100 ++++ sqlite3-pass-exts.c 2024-03-22 19:24:09.557303716 +0100 +@@ -25168,6 +25168,183 @@ sqlite3ResultStrAccum(context, &sRes); } @@ -85,8 +85,9 @@ + SHA1(hash1, SHA_DIGEST_LENGTH, hash2); + + char hex_hash[2 * SHA_DIGEST_LENGTH + 2]; ++ unsigned int i = 0; + -+ for (int i = 0; i < SHA_DIGEST_LENGTH; i++) { ++ for (i = 0; i < SHA_DIGEST_LENGTH; i++) { + sprintf(hex_hash + 2 * i + 1, "%02x", hash2[i]); + + hex_hash[2 * i + 1] = toupper(hex_hash[2 * i + 1]); @@ -148,7 +149,9 @@ + sqlite3_result_text(context, err_msg, -1, SQLITE_TRANSIENT); + return; + } else { -+ for (unsigned int i = 0; i < sizeof(salt_buf)/sizeof(unsigned char); i++) { ++ unsigned int i = 0; ++ ++ for (i = 0; i < sizeof(salt_buf)/sizeof(unsigned char); i++) { + salt_buf[i] = salt_buf[i] & 0x7f; + + if (salt_buf[i] == '\0' || salt_buf[i] == '$') { @@ -181,7 +184,7 @@ /* ** current_time() ** -@@ -129263,6 +129437,9 @@ +@@ -129263,6 +129440,9 @@ FUNCTION(substr, 3, 0, 0, substrFunc ), FUNCTION(substring, 2, 0, 0, substrFunc ), FUNCTION(substring, 3, 0, 0, substrFunc ),