From cbad05e0de1ff001154ed447d271ec171bcba862 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 1 Dec 2015 21:21:50 +0900 Subject: [PATCH] src: Fix compile error with gcc-4.7 --- src/util.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/util.cc b/src/util.cc index 90ace89a..40066588 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1244,8 +1244,13 @@ int read_mime_types(std::map &res, break; } ext_end = std::find_if(ext_start, std::end(line), delim_pred); +#ifdef HAVE_STD_MAP_EMPLACE res.emplace(std::string(ext_start, ext_end), std::string(std::begin(line), type_end)); +#else // !HAVE_STD_MAP_EMPLACE + res.insert(std::make_pair(std::string(ext_start, ext_end), + std::string(std::begin(line), type_end))); +#endif // !HAVE_STD_MAP_EMPLACE } }