aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/upnp
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-13 21:35:14 +0100
committerMax Kellermann <max@duempel.org>2014-01-13 22:24:48 +0100
commita4d580a6f87422798ba979d798115daca2649f81 (patch)
tree3cb0d44e99298e643079b4d9cf6140fbbe43261f /src/db/upnp
parentca43e634b5adfebdcb9c3c8f61cebf38d42827e0 (diff)
downloadmpd-a4d580a6f87422798ba979d798115daca2649f81.tar.gz
mpd-a4d580a6f87422798ba979d798115daca2649f81.tar.xz
mpd-a4d580a6f87422798ba979d798115daca2649f81.zip
db/upnp: add fallback for emplace()
The method emplace() was added in gcc 4.8. This commit restores compatibility with gcc 4.7.
Diffstat (limited to 'src/db/upnp')
-rw-r--r--src/db/upnp/Discovery.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/db/upnp/Discovery.cxx b/src/db/upnp/Discovery.cxx
index 8a2b7046d..23705271d 100644
--- a/src/db/upnp/Discovery.cxx
+++ b/src/db/upnp/Discovery.cxx
@@ -142,7 +142,11 @@ discoExplorer(void *)
continue;
}
+#if defined(__clang__) || GCC_CHECK_VERSION(4,8)
auto e = contentDirectories.m_directories.emplace(tsk->deviceId, d);
+#else
+ auto e = contentDirectories.m_directories.insert(std::make_pair(tsk->deviceId, d));
+#endif
if (!e.second)
e.first->second = d;
}