gnu-efi: fix discarded const qualifier on aarch64

This commit is contained in:
Nathan Zadoks 2016-12-03 17:59:00 -05:00 committed by Tuomas Tynkkynen
parent 5c0a385e1c
commit 46991f88f7
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,13 @@
diff -ru gnu-efi-3.0.4-orig/lib/aarch64/initplat.c gnu-efi-3.0.4/lib/aarch64/initplat.c
--- gnu-efi-3.0.4-orig/lib/aarch64/initplat.c 2016-03-17 09:53:14.000000000 -0400
+++ gnu-efi-3.0.4/lib/aarch64/initplat.c 2016-12-03 17:53:57.166575974 -0500
@@ -41,7 +41,8 @@
void *memcpy(void *dest, const void *src, __SIZE_TYPE__ n)
{
- unsigned char *p = dest, *q = src;
+ unsigned char *p = dest;
+ const unsigned char *q = src;
while (n--)
*p++ = *q++;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, pciutils }:
{ stdenv, fetchurl, pciutils }: with stdenv.lib;
stdenv.mkDerivation rec {
name = "gnu-efi-${version}";
@ -9,6 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "1bzq5czw5dxlvpgs9ij2iz7q6krwhja87vc982r6vffcqcl0982i";
};
patches = optional stdenv.isAarch64 ./aarch64-fix-discarded-qualifier.patch;
buildInputs = [ pciutils ];
hardeningDisable = [ "stackprotector" ];