summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-02-06 18:23:09 -0800
committerKhem Raj <raj.khem@gmail.com>2023-02-06 18:38:41 -0800
commit481467514e6813151a992ce12f081a260ebf11b2 (patch)
tree820236ec1bcbc9a0f0345d15cba8fd9612132505
parent4f43546c02445aff1829285df94209fcddeae5c3 (diff)
downloadmeta-openembedded-481467514e6813151a992ce12f081a260ebf11b2.tar.gz
cups-filters: Fix build with clang16/c++17
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-printing/cups/cups-filters/0001-use-noexcept-false-instead-of-throw-from-c-17-onward.patch36
-rw-r--r--meta-oe/recipes-printing/cups/cups-filters_1.28.11.bb1
2 files changed, 37 insertions, 0 deletions
diff --git a/meta-oe/recipes-printing/cups/cups-filters/0001-use-noexcept-false-instead-of-throw-from-c-17-onward.patch b/meta-oe/recipes-printing/cups/cups-filters/0001-use-noexcept-false-instead-of-throw-from-c-17-onward.patch
new file mode 100644
index 0000000000..5de8dae006
--- /dev/null
+++ b/meta-oe/recipes-printing/cups/cups-filters/0001-use-noexcept-false-instead-of-throw-from-c-17-onward.patch
@@ -0,0 +1,36 @@
1From 104fba23b1c0c67c92777b3165c6dca99558a656 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 6 Feb 2023 18:13:52 -0800
4Subject: [PATCH] use noexcept(false) instead of throw() from c++17 onwards
5
6C++17 removed dynamic exception specifications [1]
7they had been deprecated since C++11, replace
8throw(whatever) with noexcept(false).
9
10[1] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0003r5.html
11
12Upstream-Status: Submitted [https://github.com/OpenPrinting/cups-filters/pull/505]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 filter/pdftoraster.cxx | 4 ++++
16 1 file changed, 4 insertions(+)
17
18diff --git a/filter/pdftoraster.cxx b/filter/pdftoraster.cxx
19index e8af184fb..e91e22459 100755
20--- a/filter/pdftoraster.cxx
21+++ b/filter/pdftoraster.cxx
22@@ -2148,7 +2148,11 @@ int main(int argc, char *argv[]) {
23 /* For compatibility with g++ >= 4.7 compilers _GLIBCXX_THROW
24 * should be used as a guard, otherwise use traditional definition */
25 #ifndef _GLIBCXX_THROW
26+#if __cplusplus < 201703L
27 #define _GLIBCXX_THROW throw
28+#else
29+#define _GLIBCXX_THROW(x) noexcept(false)
30+#endif
31 #endif
32
33 void * operator new(size_t size) _GLIBCXX_THROW (std::bad_alloc)
34--
352.39.1
36
diff --git a/meta-oe/recipes-printing/cups/cups-filters_1.28.11.bb b/meta-oe/recipes-printing/cups/cups-filters_1.28.11.bb
index bfe5375b28..9a0a23671b 100644
--- a/meta-oe/recipes-printing/cups/cups-filters_1.28.11.bb
+++ b/meta-oe/recipes-printing/cups/cups-filters_1.28.11.bb
@@ -1,3 +1,4 @@
1include cups-filters.inc 1include cups-filters.inc
2 2
3SRC_URI += "file://0001-use-noexcept-false-instead-of-throw-from-c-17-onward.patch"
3SRC_URI[sha256sum] = "472418f1a1e12c9ad91b01caa020eb668626776d85de9da488be38e6663102ca" 4SRC_URI[sha256sum] = "472418f1a1e12c9ad91b01caa020eb668626776d85de9da488be38e6663102ca"