aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/nfs/Connection.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-06-17 10:35:34 +0200
committerMax Kellermann <max@duempel.org>2014-06-17 10:35:34 +0200
commiteb8fd07900826e95afde15191bb2a0c34b46138a (patch)
tree8d28a14e7d2491932086678fb63d8ce9779aec75 /src/lib/nfs/Connection.hxx
parentc99559dbe937eba73376137ceb5551f1c55764d5 (diff)
downloadmpd-eb8fd07900826e95afde15191bb2a0c34b46138a.tar.gz
mpd-eb8fd07900826e95afde15191bb2a0c34b46138a.tar.xz
mpd-eb8fd07900826e95afde15191bb2a0c34b46138a.zip
lib/nfs/Manager: gcc 4.7 compatibility hack
std::map::emplace() is only available from gcc 4.8 on.
Diffstat (limited to '')
-rw-r--r--src/lib/nfs/Connection.hxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/nfs/Connection.hxx b/src/lib/nfs/Connection.hxx
index 8850ff6f3..cb4126d25 100644
--- a/src/lib/nfs/Connection.hxx
+++ b/src/lib/nfs/Connection.hxx
@@ -103,6 +103,22 @@ public:
server(_server), export_name(_export_name),
context(nullptr) {}
+#if defined(__GNUC__) && !defined(__clang__) && !GCC_CHECK_VERSION(4,8)
+ /* needed for NfsManager::GetConnection() due to lack of
+ std::map::emplace() */
+ NfsConnection(NfsConnection &&other)
+ :SocketMonitor(((SocketMonitor &)other).GetEventLoop()),
+ DeferredMonitor(((DeferredMonitor &)other).GetEventLoop()),
+ server(std::move(other.server)),
+ export_name(std::move(other.export_name)),
+ context(nullptr) {
+ assert(other.context == nullptr);
+ assert(other.new_leases.empty());
+ assert(other.active_leases.empty());
+ assert(other.callbacks.IsEmpty());
+ }
+#endif
+
~NfsConnection();
gcc_pure