diff --git a/CMakeLists.txt b/CMakeLists.txt index d300cf5940..e2484a0b7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -243,7 +243,10 @@ else() endif() if(CMAKE_C_COMPILER_ID STREQUAL "Clang") # maybe remove - set(WARNINGS "${WARNINGS} -Wno-unused-lambda-capture -Wno-error=mismatched-tags -Wno-error=null-conversion -Wno-overloaded-shift-op-parentheses -Wno-error=shift-count-overflow -Wno-error=tautological-constant-out-of-range-compare -Wno-error=unused-private-field -Wno-error=unneeded-internal-declaration -Wno-error=unused-function") + set(WARNINGS "${WARNINGS} -Wno-error=mismatched-tags -Wno-error=null-conversion -Wno-overloaded-shift-op-parentheses -Wno-error=shift-count-overflow -Wno-error=tautological-constant-out-of-range-compare -Wno-error=unused-private-field -Wno-error=unneeded-internal-declaration -Wno-error=unused-function") + if(NOT APPLE) + set(WARNINGS "${WARNINGS} -Wno-unused-lambda-capture") + endif() # this ^ if(ARM) set(WARNINGS "${WARNINGS} -Wno-error=inline-asm") @@ -464,6 +467,10 @@ else() endif() endif() +if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set(CMAKE_EXE_LINKER_FLAGS "-pthread") +endif() + if (${BOOST_IGNORE_SYSTEM_PATHS} STREQUAL "ON") set(Boost_NO_SYSTEM_PATHS TRUE) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 38adad2a38..0672c688c2 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,10 +71,8 @@ target_link_libraries(SimpleWallet Wallet NodeRpcProxy Transfers Rpc Http Crypto target_link_libraries(PaymentGateService PaymentGate JsonRpcServer Wallet NodeRpcProxy Transfers CryptoNoteCore Crypto P2P Rpc Http System Logging Common InProcessNode upnpc-static BlockchainExplorer ${Boost_LIBRARIES} Serialization ${EXTRA_LIBRARIES}) target_link_libraries(Miner CryptoNoteCore Rpc System Http Logging Common Crypto ${Boost_LIBRARIES} Serialization ${EXTRA_LIBRARIES}) -if (LINUX) - +if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR APPLE) target_link_libraries(SimpleWallet -lresolv) - endif () add_dependencies(Rpc version) diff --git a/src/SimpleWallet/SimpleWallet.cpp b/src/SimpleWallet/SimpleWallet.cpp index 5be6be9c1d..f547aacfd1 100644 --- a/src/SimpleWallet/SimpleWallet.cpp +++ b/src/SimpleWallet/SimpleWallet.cpp @@ -1838,10 +1838,10 @@ bool simple_wallet::fetch_dns_txt(const std::string domain, std::string &record) ns_type type = ns_t_txt; const char * c_domain = (domain).c_str(); - response = res_query(c_domain, C_IN, type, query_buffer, sizeof(query_buffer)); + response = res_query(c_domain, 1, type, query_buffer, sizeof(query_buffer)); if (response < 0) - return false; + return 1; } ns_initparse(query_buffer, response, &nsMsg); diff --git a/src/crypto/aesb.h b/src/crypto/aesb.h index ebe70cdcac..5b9890b4e1 100644 --- a/src/crypto/aesb.h +++ b/src/crypto/aesb.h @@ -32,11 +32,11 @@ extern "C" #define RC_LENGTH (5 * (AES_BLOCK_SIZE / 4 - 2)) #if defined(_MSC_VER) -#define ALIGN __declspec(align(TABLE_ALIGN)) +#define ALIGN2 __declspec(align(TABLE_ALIGN)) #elif defined(__GNUC__) -#define ALIGN __attribute__ ((aligned(16))) +#define ALIGN2 __attribute__ ((aligned(16))) #else -#define ALIGN +#define ALIGN2 #endif #define rf1(r,c) (r) @@ -130,7 +130,7 @@ extern "C" #define t_set(m,n) t_##m##n #define t_use(m,n) t_##m##n -#define d_4(t,n,b,e,f,g,h) ALIGN const t n[4][256] = { b(e), b(f), b(g), b(h) } +#define d_4(t,n,b,e,f,g,h) ALIGN2 const t n[4][256] = { b(e), b(f), b(g), b(h) } #define four_tables(x,tab,vf,rf,c) \ (tab[0][bval(vf(x,0,c),rf(0,c))] \