diff --git a/cmake/Modules/freeminer_leveldb.cmake b/cmake/Modules/freeminer_leveldb.cmake index 01915ed42..e98d372e1 100644 --- a/cmake/Modules/freeminer_leveldb.cmake +++ b/cmake/Modules/freeminer_leveldb.cmake @@ -62,6 +62,10 @@ if(ENABLE_LEVELDB) set(LEVELDB_BUILD_BENCHMARKS 0 CACHE INTERNAL "") set(LEVELDB_INSTALL 0 CACHE INTERNAL "") set(HAVE_CLANG_THREAD_SAFETY 0 CACHE INTERNAL "") # -Werror remove + if(EMSCRIPTEN) # BUG? + include_directories(${ZSTD_INCLUDE_DIR}) + endif() + add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/leveldb) set(LEVELDB_LIBRARY leveldb) message(STATUS "Using bundled leveldb ${LEVELDB_INCLUDE_DIR} ${LEVELDB_LIBRARY}") diff --git a/cmake/Modules/freeminer_src.cmake b/cmake/Modules/freeminer_src.cmake index dc4fe8f02..a31c80981 100644 --- a/cmake/Modules/freeminer_src.cmake +++ b/cmake/Modules/freeminer_src.cmake @@ -1,7 +1,10 @@ # == freeminer: -OPTION(ENABLE_SCTP "Enable SCTP networking (EXPERIMENTAL)" 0) -OPTION(USE_MULTI "Enable MT+ENET+WSS networking" 1) +if(NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + OPTION(ENABLE_SCTP "Enable SCTP networking (EXPERIMENTAL)" 0) + OPTION(USE_MULTI "Enable MT+ENET+WSS networking" 1) +endif() + if(USE_MULTI) #set(ENABLE_SCTP 1 CACHE BOOL "") # Maybe bugs set(ENABLE_ENET 1 CACHE BOOL "") diff --git a/lib/sha256/sha256.c b/lib/sha256/sha256.c index dca9c0ff4..85543243f 100644 --- a/lib/sha256/sha256.c +++ b/lib/sha256/sha256.c @@ -496,7 +496,7 @@ mt_SHA256_Update(mt_SHA256_CTX *c, const void *data_, size_t len) LCRYPTO_ALIAS(SHA256_Update); void -SHA256_Transform(mt_SHA256_CTX *c, const unsigned char *data) +mt_SHA256_Transform(mt_SHA256_CTX *c, const unsigned char *data) { sha256_block_data_order(c, data, 1); } diff --git a/util/autotest/auto.pl b/util/autotest/auto.pl index 46bafe1f9..ff33c96c7 100755 --- a/util/autotest/auto.pl +++ b/util/autotest/auto.pl @@ -473,8 +473,8 @@ $commands = { sy qq{rm -rf $config->{world} } if $config->{world_clear} and $config->{world}; $config->{pid_file} = $config->{pid_path} . ($options->{pass}{name} || 'freeminer') . '.pid'; return - sytee $config->{runner}, - $commands->{env}(), + sytee $commands->{env}(), + $config->{runner}, qq{@_}, $commands->{executable}(), qq{$config->{go} --logfile $config->{logdir}/autotest.$g->{task_name}.game.log}, @@ -483,8 +483,8 @@ $commands = { 0; }, run_test => sub { - sy $config->{runner}, - $commands->{env}(), + sy $commands->{env}(), + $config->{runner}, qq{@_}, $commands->{executable}(), qq{--run-unittests --logfile $config->{logdir}/autotest.$g->{task_name}.test.log}, @@ -493,13 +493,14 @@ $commands = { set_bot => {'----bot' => 1, '----bot_random' => 1,}, run_bot => ['set_bot', 'set_client', 'run_single'], valgrind => sub { - local $config->{runner} = $config->{runner} . " valgrind @_"; - commands_run($config->{run_task}); + $g->{keep_config} = 1; + $config->{runner} = $config->{runner} . " valgrind @_"; + 0; }, run_server_simple => sub { my $fork = $config->{server_bg} ? '&' : ''; $commands->{world_name}(); - sytee $config->{runner}, $commands->{env}(), qq{@_}, $commands->{executable}(), qq{--server}, + sytee $commands->{env}(), $config->{runner}, qq{@_}, $commands->{executable}(), qq{--server}, options_make($options->{pass}{config} ? () : [qw(gameid world worldname port config autoexit verbose)]), $fork, qq{$config->{logdir}/autotest.$g->{task_name}.server.out.log}; @@ -507,8 +508,8 @@ $commands = { run_server => sub { $commands->{world_name}(); my $cmd = join ' ', - $config->{runner}, $commands->{env}(), + $config->{runner}, qq{@_}, $commands->{executable}(), ($config->{executable_name} eq 'freeminer' ? qq{--server} : ()), @@ -530,8 +531,8 @@ $commands = { for ($config->{clients_start} .. $config->{clients_num}) { Time::HiRes::sleep($config->{clients_spawn_sleep} // 0.2); sf - $config->{runner}, $commands->{env}(), + $config->{runner}, qq{@_}, $commands->{executable}(), qq{--name $config->{name}$_ --go --autoexit $autoexit --logfile $config->{logdir}/autotest.$g->{task_name}.game.log}, @@ -648,7 +649,7 @@ our $tasks = { ( map { 'valgrind_' . $_ => [ - 'debug', 'build', + #'debug', 'build', ['valgrind', '--tool=' . $_], ], } @{$config->{valgrind_tools}}