Merge pull request #318981 from K900/syslinux-fix

syslinux: pick proposed patch to fix build on gnu-efi >= 3.0.17
This commit is contained in:
K900 2024-06-11 08:18:12 +03:00 committed by GitHub
commit aa1ebdaf49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 22 additions and 4 deletions

View File

@ -1,5 +1,5 @@
{ lib, stdenv, buildPackages, fetchFromGitHub, pciutils
, gitUpdater }:
, gitUpdater, fwupd-efi, ipxe, refind, syslinux }:
stdenv.mkDerivation rec {
pname = "gnu-efi";
@ -27,10 +27,15 @@ stdenv.mkDerivation rec {
--replace "-Werror" ""
'';
passthru.updateScript = gitUpdater {
passthru = {
updateScript = gitUpdater {
# No nicer place to find latest release.
url = "https://git.code.sf.net/p/gnu-efi/code";
};
tests = {
inherit fwupd-efi ipxe refind syslinux;
};
};
meta = with lib; {
description = "GNU EFI development toolchain";

View File

@ -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 = ''

View File

@ -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 */