From 6caddf6b8e5e51013e4ef725f0ae63ee46bac111 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 3 Aug 2018 09:40:37 +0200 Subject: [PATCH] fix deprecation of mmap_cache --- src/settings_pack.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/settings_pack.cpp b/src/settings_pack.cpp index 37d3a84e2..88b50bb1c 100644 --- a/src/settings_pack.cpp +++ b/src/settings_pack.cpp @@ -95,8 +95,10 @@ namespace libtorrent { #if TORRENT_ABI_VERSION == 1 #define DEPRECATED_SET(name, default_value, fun) { #name, fun, default_value } +#define DEPRECATED_SET_STR(name, default_value, fun) { #name, fun, default_value } #else #define DEPRECATED_SET(name, default_value, fun) { "", nullptr, 0 } +#define DEPRECATED_SET_STR(name, default_value, fun) { "", nullptr, nullptr } #endif #ifdef TORRENT_WINDOWS @@ -113,7 +115,7 @@ constexpr int CLOSE_FILE_INTERVAL = 0; ({{ SET(user_agent, "libtorrent/" LIBTORRENT_VERSION, &session_impl::update_user_agent), SET(announce_ip, nullptr, nullptr), - SET(mmap_cache, nullptr, nullptr), + DEPRECATED_SET_STR(mmap_cache, nullptr, nullptr), SET(handshake_client_version, nullptr, nullptr), SET(outgoing_interfaces, "", &session_impl::update_outgoing_interfaces), #if !TORRENT_USE_IPV6