]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* include/grub/lib/LzmaDec.h: Fix to include LzmaTypes.h and
authorVladimir Serbinenko <phcoder@gmail.com>
Sun, 10 Nov 2013 19:37:01 +0000 (20:37 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sun, 10 Nov 2013 19:37:01 +0000 (20:37 +0100)
not Types.h.
* grub-core/lib/LzmaDec.c: Fix prologue to make it compileable in GRUB
environment.
(LzmaDec_InitDicAndState): Make static.

ChangeLog
grub-core/lib/LzmaDec.c
include/grub/lib/LzmaDec.h

index 04547ed03c179ae8ac94d97d5b1f9af40f45be81..394464900e9dde64e2b212d01a6258e147a9539c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-11-10  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * include/grub/lib/LzmaDec.h: Fix to include LzmaTypes.h and
+       not Types.h.
+       * grub-core/lib/LzmaDec.c: Fix prologue to make it compileable in GRUB
+       environment.
+       (LzmaDec_InitDicAndState): Make static.
+
 2013-11-10  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * util/grub-mkimagexx.c (generate_elf): Fix module address on coreboot.
index 62ebee68645b1b661c30cedb75ccff9e8fcd3234..952edb3466c96651d3cae704de3bd83358ac5f89 100644 (file)
@@ -26,7 +26,9 @@
 
 #include <grub/lib/LzmaDec.h>
 
-#include <string.h>
+#pragma GCC diagnostic ignored "-Wshadow"
+#include <grub/misc.h>
+#define memcpy grub_memcpy
 
 #define kNumTopBits 24
 #define kTopValue ((UInt32)1 << kNumTopBits)
@@ -718,7 +720,7 @@ static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data)
   p->needFlush = 0;
 }
 
-void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
+static void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState)
 {
   p->needFlush = 1;
   p->remainLen = 0;
index 1e66b74d75d8d8ecc274d9f14e26360125b8a890..16914c961c83d8f1c928bc849a502486fdc59c99 100644 (file)
@@ -27,7 +27,7 @@
 #ifndef __LZMADEC_H
 #define __LZMADEC_H
 
-#include "Types.h"
+#include "LzmaTypes.h"
 
 /* #define _LZMA_PROB32 */
 /* _LZMA_PROB32 can increase the speed on some CPUs,