From 75c7679e1ca0e7eff1adae25bbe186b10b478a9b Mon Sep 17 00:00:00 2001 From: Tom Yan Date: Sat, 22 Sep 2018 09:02:55 +0800 Subject: [PATCH] mpd: workaround clang uncaught exception bug --- packages/mpd/uncaught_exception.patch | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 packages/mpd/uncaught_exception.patch diff --git a/packages/mpd/uncaught_exception.patch b/packages/mpd/uncaught_exception.patch new file mode 100644 index 000000000..54ba35ec6 --- /dev/null +++ b/packages/mpd/uncaught_exception.patch @@ -0,0 +1,40 @@ +diff --git a/src/db/update/UpdateIO.cxx b/src/db/update/UpdateIO.cxx +index 2623b0dc4..421fb5680 100644 +--- a/src/db/update/UpdateIO.cxx ++++ b/src/db/update/UpdateIO.cxx +@@ -28,6 +28,7 @@ + #include "Log.hxx" + + #include ++#include + + #include + +@@ -84,6 +85,7 @@ try { + return GetDirectoryChildInfo(storage, directory, name_utf8) + .IsRegular(); + } catch (const std::runtime_error &) { ++ std::cout << ""; + return false; + } + +diff --git a/src/input/Error.cxx b/src/input/Error.cxx +index 3db1f26f1..dfa43093b 100644 +--- a/src/input/Error.cxx ++++ b/src/input/Error.cxx +@@ -30,12 +30,15 @@ + #include + #endif + ++#include ++ + bool + IsFileNotFound(std::exception_ptr ep) + { + try { + std::rethrow_exception(ep); + } catch (const std::system_error &e) { ++ std::cout << ""; + return IsFileNotFound(e); + #ifdef ENABLE_CURL + } catch (const HttpStatusError &e) {