From 945775e9f52f21758bbe38f5e861265688b3593f Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Thu, 18 Oct 2018 04:21:23 +0200 Subject: [PATCH] Fix deep search compiling on 32bit time_t targets --- libretroshare/src/deep_search/deep_search.h | 3 ++- libretroshare/src/gxs/rsgxsnetservice.cc | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libretroshare/src/deep_search/deep_search.h b/libretroshare/src/deep_search/deep_search.h index e9cb84b8b..5d2361342 100644 --- a/libretroshare/src/deep_search/deep_search.h +++ b/libretroshare/src/deep_search/deep_search.h @@ -264,7 +264,8 @@ private: static std::string timetToXapianDate(const rstime_t& time) { char date[] = "YYYYMMDD\0"; - std::strftime(date, 9, "%Y%m%d", std::gmtime(&time)); + time_t tTime = static_cast(time); + std::strftime(date, 9, "%Y%m%d", std::gmtime(&tTime)); return date; } }; diff --git a/libretroshare/src/gxs/rsgxsnetservice.cc b/libretroshare/src/gxs/rsgxsnetservice.cc index 02bdb1b9b..cb73e06a7 100644 --- a/libretroshare/src/gxs/rsgxsnetservice.cc +++ b/libretroshare/src/gxs/rsgxsnetservice.cc @@ -5140,11 +5140,13 @@ TurtleRequestId RsGxsNetService::turtleSearchRequest(const std::string& match_st return mGxsNetTunnel->turtleSearchRequest(match_string,this) ; } +#ifndef RS_DEEP_SEARCH static bool termSearch(const std::string& src, const std::string& substring) { /* always ignore case */ return src.end() != std::search( src.begin(), src.end(), substring.begin(), substring.end(), RsRegularExpression::CompareCharIC() ); } +#endif // ndef RS_DEEP_SEARCH bool RsGxsNetService::retrieveDistantSearchResults(TurtleRequestId req,std::map& group_infos) {