From 821d08999ab0c94d2224ebd6734b9152924ea20e Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 16 Sep 2020 18:09:03 -0700 Subject: [PATCH] remove GCC5 hacks GCC5 cannot build mpd. Signed-off-by: Rosen Penev --- src/lib/upnp/ContentDirectoryService.cxx | 4 +--- src/net/IPv6Address.hxx | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/upnp/ContentDirectoryService.cxx b/src/lib/upnp/ContentDirectoryService.cxx index 4c80820e6..56d1cf3aa 100644 --- a/src/lib/upnp/ContentDirectoryService.cxx +++ b/src/lib/upnp/ContentDirectoryService.cxx @@ -69,9 +69,7 @@ ContentDirectoryService::getSearchCapabilities(UpnpClient_Handle hdl) const const char *s = ixmlwrap::getFirstElementValue(response.get(), "SearchCaps"); if (s == nullptr || *s == 0) - /* we could just "return {}" here, but GCC 5 doesn't - understand that */ - return std::forward_list(); + return {}; std::forward_list result; for (const auto &i : IterableSplitString(s, ',')) diff --git a/src/net/IPv6Address.hxx b/src/net/IPv6Address.hxx index 4f75c81fc..52606024f 100644 --- a/src/net/IPv6Address.hxx +++ b/src/net/IPv6Address.hxx @@ -178,7 +178,7 @@ public: /** * Is this an IPv4 address mapped inside struct sockaddr_in6? */ -#if defined(__linux__) && !GCC_OLDER_THAN(5,0) +#if defined(__linux__) constexpr #endif bool IsV4Mapped() const noexcept {