packages/sound/mpd/patches/020-string-view.patch
Rosen Penev 09ec2fcdd1 mpd: update to 0.22.6
Add patch fixing compilation with Debian 9.

Remove npupnp patch. While it doesn't seem to have any negative effects
there's no real benefit to it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-03-05 22:08:59 -08:00

34 lines
835 B
Diff

--- a/src/tag/GenParseName.cxx
+++ b/src/tag/GenParseName.cxx
@@ -21,7 +21,13 @@
#include <cstdlib>
#include <map>
+#if __has_include("<string_view>")
#include <string_view>
+using std::string_view;
+#else
+#include <boost/utility/string_view.hpp>
+using boost::string_view;
+#endif
#include <stdio.h>
@@ -41,7 +47,7 @@ main(int argc, char **argv)
FILE *out = fopen(argv[1], "w");
- std::map<std::string_view, TagType> names;
+ std::map<string_view, TagType> names;
for (unsigned i = 0; i < unsigned(TAG_NUM_OF_ITEM_TYPES); ++i)
names[tag_item_names[i]] = TagType(i);
@@ -61,7 +67,7 @@ main(int argc, char **argv)
char first = 0;
for (const auto &i : names) {
- const std::string_view name = i.first;
+ const string_view name = i.first;
const TagType tag = i.second;
if (name.front() != first) {