diff --git a/src/params.cpp b/src/params.cpp index 4b0f69b..fd8bf47 100644 --- a/src/params.cpp +++ b/src/params.cpp @@ -100,10 +100,12 @@ Params::Params(int argc, char* argv[]) ok = true; } +#ifdef WITH_RANDOMX if (strcmp(argv[i], "--no-randomx") == 0) { m_disableRandomX = true; ok = true; } +#endif if ((!strcmp(argv[i], "--out-peers") || !strcmp(argv[i], "--outpeers")) && (i + 1 < argc)) { m_maxOutgoingPeers = std::min(std::max(strtoul(argv[++i], nullptr, 10), 10UL), 450UL); @@ -151,10 +153,12 @@ Params::Params(int argc, char* argv[]) ok = true; } +#ifdef WITH_UPNP if (strcmp(argv[i], "--no-upnp") == 0) { m_upnp = false; ok = true; } +#endif if (!ok) { fprintf(stderr, "Unknown command line parameter %s\n\n", argv[i]); diff --git a/src/params.h b/src/params.h index 5d1bc84..42005b5 100644 --- a/src/params.h +++ b/src/params.h @@ -53,7 +53,11 @@ struct Params std::string m_socks5Proxy; bool m_dns = true; uint32_t m_p2pExternalPort = 0; +#ifdef WITH_UPNP bool m_upnp = true; +#else + bool m_upnp = false; +#endif }; } // namespace p2pool