aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/db/UpnpDatabasePlugin.cxx7
-rw-r--r--src/db/upnp/Discovery.cxx4
2 files changed, 10 insertions, 1 deletions
diff --git a/src/db/UpnpDatabasePlugin.cxx b/src/db/UpnpDatabasePlugin.cxx
index 68a24cb4f..78171562e 100644
--- a/src/db/UpnpDatabasePlugin.cxx
+++ b/src/db/UpnpDatabasePlugin.cxx
@@ -829,8 +829,13 @@ UpnpDatabase::VisitUniqueTags(const DatabaseSelection &selection,
for (auto &dirent : dirbuf.m_items) {
std::string tagvalue;
- if (getTagValue(dirent, tag, tagvalue))
+ if (getTagValue(dirent, tag, tagvalue)) {
+#if defined(__clang__) || GCC_CHECK_VERSION(4,8)
values.emplace(std::move(tagvalue));
+#else
+ values.insert(std::move(tagvalue));
+#endif
+ }
}
}
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;
}