Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0386496

Browse files
committedMar 7, 2025·
bugfix(xlog) : Fixed compilation error if XLOG_NO_CRYPT macro was defined / enabled
1 parent db98964 commit 0386496

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
 

‎mars/xlog/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ elseif(ANDROID)
5454
../comm/xlogger/xlogger.cc
5555
jni/*.cc
5656
../mk_template/JNI_OnLoad.cpp)
57-
57+
5858
list(APPEND SELF_SRC_FILES ${SELF_ANDROID_SRC_FILES})
5959

6060
get_filename_component(EXPORT_EXP_FILE jni/export.exp ABSOLUTE)
@@ -73,5 +73,5 @@ endif()
7373
BuildWithUnitTest("${PROJECT_NAME}" "${SELF_SRC_FILES}")
7474

7575

76-
77-
76+
77+

‎mars/xlog/crypt/log_crypt.cc

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ namespace xlog {
4141

4242
const static int TEA_BLOCK_LEN = 8;
4343

44+
#ifndef XLOG_NO_CRYPT
4445
static void __TeaEncrypt(uint32_t* v, uint32_t* k) {
4546
uint32_t v0 = v[0], v1 = v[1], sum = 0, i;
4647
const static uint32_t delta = 0x9e3779b9;
@@ -53,6 +54,7 @@ static void __TeaEncrypt(uint32_t* v, uint32_t* k) {
5354
v[0] = v0;
5455
v[1] = v1;
5556
}
57+
#endif
5658

5759
static uint16_t __GetSeq(bool _is_async) {
5860
if (!_is_async) {

0 commit comments

Comments
 (0)
Please sign in to comment.