Skip to contentSkip to conversation

systemd-boot: Fix build on musl

PATCH New Khem Raj 1 participant 1 message Aug 11, 2023

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/1 systemd-boot: Fix build on musl

systemd efi.h defines wchar_t from compiler provided __WCHAR_TYPE__ therefore we do not want it to come from alltypes.h in musl case which otherwise will end up with conflicting definitions of wchar_t, defining __DEFINED_wchar_t ensures that alltypes.h does not provide it

---
 meta/recipes-core/systemd/systemd-boot_254.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-core/systemd/systemd-boot_254.bb +2 -0
index 4fee99beada..642a5fafe74 100644
@@ -50,6 +50,8 @@ RDEPENDS:${PN} += "virtual-systemd-bootconf"
 # Imported from the old gummiboot recipe
 TUNE_CCARGS:remove = "-mfpmath=sse"
 
+CFLAGS:append:libc-musl = " -D__DEFINED_wchar_t"
+
 COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*)-linux"
 COMPATIBLE_HOST:x86-x32 = "null"
 
Signature · 1 line
2.41.0