From fdcf4e43afd6185d81ceb0f73fbd927ec178fce9 Mon Sep 17 00:00:00 2001 From: Gregory Lemercier Date: Fri, 11 Jan 2019 11:47:29 +0100 Subject: [PATCH 1/2] Windows: fix checks for openssl 1.1.1 in MSYS2 Retrieved from upstream patch: https://github.com/monero-project/unbound/commit/c0094c70e8f7d95e8f27009d4ab214e8b042fece --- external/unbound/configure_checks.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/external/unbound/configure_checks.cmake b/external/unbound/configure_checks.cmake index 2acf556d..bdff8bfe 100644 --- a/external/unbound/configure_checks.cmake +++ b/external/unbound/configure_checks.cmake @@ -191,16 +191,17 @@ check_include_file(openssl/err.h HAVE_OPENSSL_ERR_H) check_include_file(openssl/rand.h HAVE_OPENSSL_RAND_H) check_include_file(openssl/ssl.h HAVE_OPENSSL_SSL_H) -set(CMAKE_REQUIRED_INCLUDES) +set(CMAKE_REQUIRED_LIBRARIES + ${OPENSSL_LIBRARIES}) +if (WIN32 AND OPENSSL_VERSION STRGREATER "1.1.0") + set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};ws2_32") +endif() check_symbol_exists(NID_secp384r1 "openssl/evp.h" HAVE_DECL_NID_SECP384R1) check_symbol_exists(NID_X9_62_prime256v1 "openssl/evp.h" HAVE_DECL_NID_X9_62_PRIME256V1) check_symbol_exists(sk_SSL_COMP_pop_free "openssl/ssl.h" HAVE_DECL_SK_SSL_COMP_POP_FREE) check_symbol_exists(SSL_COMP_get_compression_methods "openssl/ssl.h" HAVE_DECL_SSL_COMP_GET_COMPRESSION_METHODS) -set(CMAKE_REQUIRED_LIBRARIES - ${OPENSSL_LIBRARIES}) - check_function_exists(EVP_MD_CTX_new HAVE_EVP_MD_CTX_NEW) check_function_exists(EVP_sha1 HAVE_EVP_SHA1) check_function_exists(EVP_sha256 HAVE_EVP_SHA256) @@ -210,6 +211,7 @@ check_function_exists(HMAC_Update HAVE_HMAC_UPDATE) check_function_exists(OPENSSL_config HAVE_OPENSSL_CONFIG) check_function_exists(SHA512_Update HAVE_SHA512_UPDATE) +set(CMAKE_REQUIRED_INCLUDES) set(CMAKE_REQUIRED_LIBRARIES) set(UNBOUND_CONFIGFILE "${CMAKE_INSTALL_PREFIX}/etc/unbound/unbound.conf" From 533260bd77964730400603922c1b1919ee11f152 Mon Sep 17 00:00:00 2001 From: Gregory Lemercier Date: Fri, 11 Jan 2019 13:36:26 +0100 Subject: [PATCH 2/2] miner: fix build with boost 1.69 Retrieved from upstream patch: https://github.com/monero-project/monero/commit/3bb4b0d41f76483c4ae4d8d62faa4531049badeb --- src/cryptonote_basic/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index 75b51464..89b17fbb 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -632,7 +632,7 @@ namespace cryptonote } else { - on_ac_power = !battery_powered; + on_ac_power = !(bool)battery_powered; } if( m_is_background_mining_started )