1
0

mkpiggy.patch 805 B

12345678910111213141516171819202122232425262728
  1. diff -Nur linux-3.13.3.orig/arch/x86/boot/compressed/mkpiggy.c linux-3.13.3/arch/x86/boot/compressed/mkpiggy.c
  2. --- linux-3.13.3.orig/arch/x86/boot/compressed/mkpiggy.c 2014-02-13 23:00:14.000000000 +0100
  3. +++ linux-3.13.3/arch/x86/boot/compressed/mkpiggy.c 2014-02-17 11:09:06.000000000 +0100
  4. @@ -29,7 +29,14 @@
  5. #include <stdio.h>
  6. #include <string.h>
  7. #include <inttypes.h>
  8. -#include <tools/le_byteshift.h>
  9. +
  10. +static uint32_t getle32(const void *p)
  11. +{
  12. + const uint8_t *cp = p;
  13. +
  14. + return (uint32_t)cp[0] + ((uint32_t)cp[1] << 8) +
  15. + ((uint32_t)cp[2] << 16) + ((uint32_t)cp[3] << 24);
  16. +}
  17. int main(int argc, char *argv[])
  18. {
  19. @@ -63,7 +70,7 @@
  20. }
  21. ilen = ftell(f);
  22. - olen = get_unaligned_le32(&olen);
  23. + olen = getle32(&olen);
  24. /*
  25. * Now we have the input (compressed) and output (uncompressed)