diff --git a/pkgs/os-specific/linux/syslinux/default.nix b/pkgs/os-specific/linux/syslinux/default.nix index b976a3be83e5..6023c6e82ff8 100644 --- a/pkgs/os-specific/linux/syslinux/default.nix +++ b/pkgs/os-specific/linux/syslinux/default.nix @@ -69,6 +69,8 @@ stdenv.mkDerivation { "sha256-dVzXBi/oSV9vYgU85mRFHBKuZdup+1x1BipJX74ED7E=") # Fixes build with "modern" gnu-efi ./import-efisetjmp.patch + # Upstream patch: https://www.syslinux.org/archives/2024-February/026903.html + ./define-wchar_t.patch ]; postPatch = '' diff --git a/pkgs/os-specific/linux/syslinux/define-wchar_t.patch b/pkgs/os-specific/linux/syslinux/define-wchar_t.patch new file mode 100644 index 000000000000..92baf101fb41 --- /dev/null +++ b/pkgs/os-specific/linux/syslinux/define-wchar_t.patch @@ -0,0 +1,11 @@ +diff --git a/com32/include/stddef.h b/com32/include/stddef.h +index f52d62f3..437b11f2 100644 +--- a/com32/include/stddef.h ++++ b/com32/include/stddef.h +@@ -29,4 +29,6 @@ + */ + #define container_of(p, c, m) ((c *)((char *)(p) - offsetof(c,m))) + ++typedef short wchar_t; ++ + #endif /* _STDDEF_H */