From a6c9e14ba50f052609ad92599eaf62bf1595c7cf Mon Sep 17 00:00:00 2001 From: Ilya Grechuhin Date: Mon, 24 Aug 2015 14:24:17 +0300 Subject: [PATCH] [linux] Build fix. --- search/intermediate_result.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/search/intermediate_result.cpp b/search/intermediate_result.cpp index f9b764a1d3..ec040f3adb 100644 --- a/search/intermediate_result.cpp +++ b/search/intermediate_result.cpp @@ -1,4 +1,7 @@ +#ifndef OMIM_OS_LINUX +// Lib opening_hours is not built for Linux since stdlib doesn't have required functions. #include "3party/opening_hours/osm_time_range.hpp" +#endif #include "intermediate_result.hpp" #include "geometry_utils.hpp" @@ -149,8 +152,12 @@ PreResult2::PreResult2(m2::PointD const & pt, string const & str, uint32_t type) void PreResult2::ProcessMetadata(feature::Metadata const & meta) { m_metadata.m_cuisine = meta.Get(feature::Metadata::FMD_CUISINE); + +#ifndef OMIM_OS_LINUX + // Lib opening_hours is not built for Linux since stdlib doesn't have required functions. m_metadata.m_isClosed = - OSMTimeRange(meta.Get(feature::Metadata::FMD_OPEN_HOURS))(time(nullptr)).IsClosed(); + OSMTimeRange(meta.Get(feature::Metadata::FMD_OPEN_HOURS))(time(nullptr)).IsClosed(); +#endif m_metadata.m_stars = 0; strings::to_int(meta.Get(feature::Metadata::FMD_STARS), m_metadata.m_stars);