Skip to content

Commit

Permalink
Add support for building the monolith test on android.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Jan 6, 2018
1 parent d26f0eb commit c09c3b6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,19 @@ function(auto_test target)
endfunction()

if(BUILD_TOXAV)
add_c_executable(auto_monolith_test auto_tests/monolith_test.c)
add_c_executable(auto_monolith_test
auto_tests/monolith_test.c
${ANDROID_CPU_FEATURES})
target_link_modules(auto_monolith_test
${LIBSODIUM_LIBRARIES}
${OPUS_LIBRARIES}
${VPX_LIBRARIES}
${toxcore_PKGCONFIG_LIBS})
add_test(NAME monolith COMMAND auto_monolith_test)

if(ANDROID_CPU_FEATURES)
target_compile_definitions(auto_monolith_test PRIVATE -Dtypeof=__typeof__)
endif()
endif()

auto_test(TCP)
Expand Down
8 changes: 4 additions & 4 deletions toxcore/group.c
Original file line number Diff line number Diff line change
Expand Up @@ -1832,8 +1832,8 @@ static unsigned int send_lossy_all_close(const Group_Chats *g_c, int groupnumber
uint64_t comp_val_old = ~0;

for (i = 0; i < num_connected_closest; ++i) {
uint8_t real_pk[CRYPTO_PUBLIC_KEY_SIZE];
uint8_t dht_temp_pk[CRYPTO_PUBLIC_KEY_SIZE];
uint8_t real_pk[CRYPTO_PUBLIC_KEY_SIZE] = {0};
uint8_t dht_temp_pk[CRYPTO_PUBLIC_KEY_SIZE] = {0};
get_friendcon_public_keys(real_pk, dht_temp_pk, g_c->fr_c, g->close[connected_closest[i]].number);
uint64_t comp_val = calculate_comp_value(g->real_pk, real_pk);

Expand All @@ -1852,8 +1852,8 @@ static unsigned int send_lossy_all_close(const Group_Chats *g_c, int groupnumber
comp_val_old = ~0;

for (i = 0; i < num_connected_closest; ++i) {
uint8_t real_pk[CRYPTO_PUBLIC_KEY_SIZE];
uint8_t dht_temp_pk[CRYPTO_PUBLIC_KEY_SIZE];
uint8_t real_pk[CRYPTO_PUBLIC_KEY_SIZE] = {0};
uint8_t dht_temp_pk[CRYPTO_PUBLIC_KEY_SIZE] = {0};
get_friendcon_public_keys(real_pk, dht_temp_pk, g_c->fr_c, g->close[connected_closest[i]].number);
uint64_t comp_val = calculate_comp_value(real_pk, g->real_pk);

Expand Down

0 comments on commit c09c3b6

Please sign in to comment.