aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/nfs/Manager.cxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/nfs/Manager.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/nfs/Manager.cxx b/src/lib/nfs/Manager.cxx
index 56a3fb79a..5c236552c 100644
--- a/src/lib/nfs/Manager.cxx
+++ b/src/lib/nfs/Manager.cxx
@@ -39,10 +39,19 @@ NfsManager::GetConnection(const char *server, const char *export_name)
const std::string key = Key(server, export_name);
+#if defined(__GNUC__) && !defined(__clang__) && !GCC_CHECK_VERSION(4,8)
+ /* std::map::emplace() not available; this hack uses the move
+ constructor */
+ auto e = connections.insert(std::make_pair(key,
+ ManagedConnection(*this, loop,
+ server,
+ export_name)));
+#else
auto e = connections.emplace(std::piecewise_construct,
std::forward_as_tuple(key),
std::forward_as_tuple(*this, loop,
server,
export_name));
+#endif
return e.first->second;
}