[oe,meta-multimedia,1/5] mpd: Fix build with gcc10

Message ID 20191227035639.303716-1-raj.khem@gmail.com
State New
Headers show
Series
  • [oe,meta-multimedia,1/5] mpd: Fix build with gcc10
Related show

Commit Message

Khem Raj Dec. 27, 2019, 3:56 a.m.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andreas Müller <schnitzeltony@gmail.com>
---
 ...ingBuffer-Include-cstddef-for-size_t.patch | 27 +++++++++++++
 ...-Include-stdexcept-for-runtime_error.patch | 38 +++++++++++++++++++
 .../recipes-multimedia/musicpd/mpd_0.20.22.bb |  2 +
 3 files changed, 67 insertions(+)
 create mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd/0001-StringBuffer-Include-cstddef-for-size_t.patch
 create mode 100644 meta-multimedia/recipes-multimedia/musicpd/mpd/0002-Include-stdexcept-for-runtime_error.patch

Patch

diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-StringBuffer-Include-cstddef-for-size_t.patch b/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-StringBuffer-Include-cstddef-for-size_t.patch
new file mode 100644
index 0000000000..1d869aa833
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-StringBuffer-Include-cstddef-for-size_t.patch
@@ -0,0 +1,27 @@ 
+From c14877071f14b218835f7fb034dea11bd1ba56f5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 25 Dec 2019 09:40:16 -0800
+Subject: [PATCH] StringBuffer: Include cstddef for size_t
+
+Fixes
+a.cpp:3:1: error: 'size_t' does not name a type
+    3 | size_t s;
+      | ^~~~~~
+a.cpp:2:1: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
+
+Upstream-Status: Submitted [https://github.com/MusicPlayerDaemon/MPD/pull/697]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/util/StringBuffer.hxx | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/util/StringBuffer.hxx
++++ b/src/util/StringBuffer.hxx
+@@ -31,6 +31,7 @@
+ #define STRING_BUFFER_HPP
+ 
+ #include <array>
++#include <cstddef>
+ 
+ /**
+  * A statically allocated string buffer.
diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd/0002-Include-stdexcept-for-runtime_error.patch b/meta-multimedia/recipes-multimedia/musicpd/mpd/0002-Include-stdexcept-for-runtime_error.patch
new file mode 100644
index 0000000000..1f11867191
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/musicpd/mpd/0002-Include-stdexcept-for-runtime_error.patch
@@ -0,0 +1,38 @@ 
+From 06f78ced45f6622a2e02cd09e6a2c0c22a98b89e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 25 Dec 2019 09:41:55 -0800
+Subject: [PATCH 2/2] Include <stdexcept> for runtime_error
+
+Fixes
+
+../git/src/LocateUri.cxx:65:14: error: 'runtime_error' is not a member of 'std'
+   65 |   throw std::runtime_error("Unsupported URI scheme");
+      |              ^~~~~~~~~~~~~
+
+Upstream-Status: Inappropriate [ Fixed differently upstream ]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/LocateUri.cxx      | 1 +
+ src/pcm/PcmConvert.cxx | 1 +
+ 2 files changed, 2 insertions(+)
+
+--- a/src/LocateUri.cxx
++++ b/src/LocateUri.cxx
+@@ -17,6 +17,7 @@
+  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+  */
+ 
++#include <stdexcept>
+ #include "config.h"
+ #include "LocateUri.hxx"
+ #include "client/Client.hxx"
+--- a/src/pcm/PcmConvert.cxx
++++ b/src/pcm/PcmConvert.cxx
+@@ -17,6 +17,7 @@
+  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+  */
+ 
++#include <stdexcept>
+ #include "config.h"
+ #include "PcmConvert.hxx"
+ #include "ConfiguredResampler.hxx"
diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb
index 6c6ad42375..133ee6e792 100644
--- a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb
+++ b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb
@@ -19,6 +19,8 @@  DEPENDS += " \
 SRC_URI = " \
     git://github.com/MusicPlayerDaemon/MPD;branch=v0.20.x \
     file://mpd.conf.in \
+    file://0001-StringBuffer-Include-cstddef-for-size_t.patch \
+    file://0002-Include-stdexcept-for-runtime_error.patch \
 "
 SRCREV = "9274bc15bc41bbe490fde847f8422468cc20375d"
 S = "${WORKDIR}/git"