1
0

mkpiggy.patch 748 B

12345678910111213141516171819202122232425262728
  1. diff -Nur linux-3.4.4.orig/arch/x86/boot/compressed/mkpiggy.c linux-3.4.4/arch/x86/boot/compressed/mkpiggy.c
  2. --- linux-3.4.4.orig/arch/x86/boot/compressed/mkpiggy.c 2012-06-22 20:37:50.000000000 +0200
  3. +++ linux-3.4.4/arch/x86/boot/compressed/mkpiggy.c 2012-07-03 09:48:02.000000000 +0200
  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. @@ -62,7 +69,7 @@
  20. }
  21. ilen = ftell(f);
  22. - olen = get_unaligned_le32(&olen);
  23. + olen = getle32(&olen);
  24. fclose(f);
  25. /*