summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch')
-rw-r--r--meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch b/meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch
new file mode 100644
index 0000000000..6d27b4835d
--- /dev/null
+++ b/meta/recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch
@@ -0,0 +1,42 @@
1From ccf8a58c3536ca0e62748e0ea477514e14d821bc Mon Sep 17 00:00:00 2001
2From: Adrian Perez de Castro <aperez@igalia.com>
3Date: Thu, 4 Aug 2022 12:19:05 +0300
4Subject: [PATCH] Fix build failure due to libc++ using libc functions
5
6Include the "alloc-private.h" header after the C++ standard library
7headers. This sidesteps build failures caused by implementations of
8std::map and std::string which use libc memory allocation functions
9in expanded templates after they have been marked with the "poison"
10pragma.
11
12Fixes #115
13
14Upstream-Status: Backport
15Signed-off-by: Alexander Kanavin <alex@linutronix.de>
16---
17 src/pasteboard-generic.cpp | 9 ++++++---
18 1 file changed, 6 insertions(+), 3 deletions(-)
19
20diff --git a/src/pasteboard-generic.cpp b/src/pasteboard-generic.cpp
21index 86fe4ee..a357027 100644
22--- a/src/pasteboard-generic.cpp
23+++ b/src/pasteboard-generic.cpp
24@@ -26,12 +26,15 @@
25
26 #include "pasteboard-private.h"
27
28-#include "alloc-private.h"
29-#include <cstdlib>
30-#include <cstring>
31 #include <map>
32 #include <string>
33
34+// We need to include this header last, in order to avoid template expansions
35+// from the C++ standard library happening after it forbids usage of the libc
36+// memory functions.
37+#include "alloc-private.h"
38+#include <cstring>
39+
40 namespace Generic {
41 using Pasteboard = std::map<std::string, std::string>;
42 }