Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions mars/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ if(ANDROID)
file(GLOB SELF_SRC_FILES libraries/mars_android_sdk/jni/JNI_OnLoad.cc
libraries/mars_xlog_sdk/jni/import.cc)
add_library(${SELF_LIB_NAME} SHARED ${SELF_SRC_FILES})
set_target_properties(
${SELF_LIB_NAME}
PROPERTIES
LINK_FLAGS "-Wl,-z,max-page-size=16384 -Wl,-z,common-page-size=16384"
)
install(TARGETS ${SELF_LIB_NAME} LIBRARY DESTINATION ${SELF_LIBS_OUT} ARCHIVE DESTINATION ${SELF_LIBS_OUT})
get_filename_component(EXPORT_XLOG_EXP_FILE libraries/mars_android_sdk/jni/export.exp ABSOLUTE)
set(SELF_XLOG_LINKER_FLAG "-Wl,--gc-sections -Wl,--version-script='${EXPORT_XLOG_EXP_FILE}'")
Expand All @@ -67,6 +72,11 @@ if(ANDROID)
set(SELF_LIB_NAME marsstn)
file(GLOB SELF_SRC_FILES libraries/mars_android_sdk/jni/*.cc)
add_library(${SELF_LIB_NAME} SHARED ${SELF_SRC_FILES})
set_target_properties(
${SELF_LIB_NAME}
PROPERTIES
LINK_FLAGS "-Wl,-z,max-page-size=16384 -Wl,-z,common-page-size=16384"
)
install(TARGETS ${SELF_LIB_NAME} LIBRARY DESTINATION ${SELF_LIBS_OUT} ARCHIVE DESTINATION ${SELF_LIBS_OUT})
link_directories(${SELF_LIBS_OUT})
find_library(CRYPT_LIB crypto PATHS openssl/openssl_lib_android/${ANDROID_ABI} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
Expand Down
2 changes: 1 addition & 1 deletion mars/xlog/crypt/decode_log_file_c_impl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../../)


add_executable(decode_log_file decode_log_file.c micro-ecc-master/uECC.c)
target_link_libraries(decode_log_file libzstd_static)
target_link_libraries(decode_log_file libzstd_static z)
1 change: 1 addition & 0 deletions mars/xlog/crypt/decode_log_file_c_impl/decode_log_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ bool zstdDecompress(const char* compressedBytes, size_t compressedBytesSize, cha
ZSTD_inBuffer input = {compressedBytes, compressedBytesSize, 0};
ZSTD_outBuffer output = {NULL, compressedBytesSize, 0};
bool done = false;
size_t lastPos = output.pos;

while (!done) {
if (output.pos >= uncompLength) {
Expand Down
2 changes: 1 addition & 1 deletion mars/xlog/src/appender.cc
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ void XloggerAppender::Open(const XLogConfig& _config) {
config_.cachedir_,
config_.logdir_,
config_.nameprefix_));
thread_timeout_cache_->start_after(3 * 60 * 1000);
thread_moveold_->start_after(3 * 60 * 1000);
#ifdef __APPLE__
setAttrProtectionNone(config_.cachedir_.c_str());
#endif
Expand Down