forked from openembedded/openembedded-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
- Loading branch information
Showing
2 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
.../recipes-sato/webkit/libwpe/0001-Fix-build-failure-due-to-libc-using-libc-functions.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
From ccf8a58c3536ca0e62748e0ea477514e14d821bc Mon Sep 17 00:00:00 2001 | ||
From: Adrian Perez de Castro <aperez@igalia.com> | ||
Date: Thu, 4 Aug 2022 12:19:05 +0300 | ||
Subject: [PATCH] Fix build failure due to libc++ using libc functions | ||
|
||
Include the "alloc-private.h" header after the C++ standard library | ||
headers. This sidesteps build failures caused by implementations of | ||
std::map and std::string which use libc memory allocation functions | ||
in expanded templates after they have been marked with the "poison" | ||
pragma. | ||
|
||
Fixes #115 | ||
|
||
Upstream-Status: Backport | ||
Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
--- | ||
src/pasteboard-generic.cpp | 9 ++++++--- | ||
1 file changed, 6 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/src/pasteboard-generic.cpp b/src/pasteboard-generic.cpp | ||
index 86fe4ee..a357027 100644 | ||
--- a/src/pasteboard-generic.cpp | ||
+++ b/src/pasteboard-generic.cpp | ||
@@ -26,12 +26,15 @@ | ||
|
||
#include "pasteboard-private.h" | ||
|
||
-#include "alloc-private.h" | ||
-#include <cstdlib> | ||
-#include <cstring> | ||
#include <map> | ||
#include <string> | ||
|
||
+// We need to include this header last, in order to avoid template expansions | ||
+// from the C++ standard library happening after it forbids usage of the libc | ||
+// memory functions. | ||
+#include "alloc-private.h" | ||
+#include <cstring> | ||
+ | ||
namespace Generic { | ||
using Pasteboard = std::map<std::string, std::string>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters