summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0026-src-boot-efi-efi-string.c-define-wchar_t-from-__WCHA.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0026-src-boot-efi-efi-string.c-define-wchar_t-from-__WCHA.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0026-src-boot-efi-efi-string.c-define-wchar_t-from-__WCHA.patch44
1 files changed, 0 insertions, 44 deletions
diff --git a/meta/recipes-core/systemd/systemd/0026-src-boot-efi-efi-string.c-define-wchar_t-from-__WCHA.patch b/meta/recipes-core/systemd/systemd/0026-src-boot-efi-efi-string.c-define-wchar_t-from-__WCHA.patch
deleted file mode 100644
index c7e2280c3b..0000000000
--- a/meta/recipes-core/systemd/systemd/0026-src-boot-efi-efi-string.c-define-wchar_t-from-__WCHA.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 34072f456b4fe880fbb2f18760b64a1a6c1eebb8 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Mon, 6 Mar 2023 15:24:49 +0100
4Subject: [PATCH] src/boot/efi/efi-string.c: define wchar_t from __WCHAR_TYPE__
5
6systemd-boot relies on wchar_t being 16 bit, and breaks at build time otherwise.
7
8To set wchar_t to 16 bit it is passing -fshort-wchar to gcc; this has the
9desired effect on glibc (which sets wchar_t from __WCHAR_TYPE__) but not on
10musl (which hardcodes it to 32 bit).
11
12This patch ensures wchar_t is set from the compiler flags on all systems; note
13that systemd-boot is not actually using functions from musl or other libc, just their headers.
14
15Meanwhile upstream has refactored the code to not rely on libc headers at all;
16however this will not be backported to v253 and we need a different fix.
17
18Upstream-Status: Inappropriate [fixed differently in trunk according to https://github.com/systemd/systemd/pull/26689]
19Signed-off-by: Alexander Kanavin <alex@linutronix.de>
20---
21 src/boot/efi/efi-string.c | 6 ++++++
22 1 file changed, 6 insertions(+)
23
24diff --git a/src/boot/efi/efi-string.c b/src/boot/efi/efi-string.c
25index 22923d60f6..5d09d4281f 100644
26--- a/src/boot/efi/efi-string.c
27+++ b/src/boot/efi/efi-string.c
28@@ -2,7 +2,13 @@
29
30 #include <stdbool.h>
31 #include <stdint.h>
32+
33+#if SD_BOOT
34+typedef __WCHAR_TYPE__ wchar_t;
35+#define __DEFINED_wchar_t
36+#else
37 #include <wchar.h>
38+#endif
39
40 #include "efi-string.h"
41
42--
432.39.2
44