Blame SOURCES/0012-fix-32-bit-compilation-on-MinGW-w64.patch

d41074
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
a85e8e
From: Andrey Borzenkov <arvidjaar@gmail.com>
a85e8e
Date: Tue, 7 Jan 2014 18:43:02 +0400
d41074
Subject: [PATCH] fix 32 bit compilation on MinGW-w64
a85e8e
a85e8e
Use _FILE_OFFSET_BITS macro to distinguish between native MinGW and
a85e8e
32 bit under MinGW-64. The latter does not require fseeko/ftello
a85e8e
redefinition which it already does in case of _FILE_OFFSET_BITS=64.
a85e8e
---
a85e8e
 include/grub/osdep/hostfile_windows.h | 3 +++
d41074
 ChangeLog                             | 5 +++++
a85e8e
 2 files changed, 8 insertions(+)
a85e8e
a85e8e
diff --git a/include/grub/osdep/hostfile_windows.h b/include/grub/osdep/hostfile_windows.h
d41074
index 36615b2c451..79efcfa5084 100644
a85e8e
--- a/include/grub/osdep/hostfile_windows.h
a85e8e
+++ b/include/grub/osdep/hostfile_windows.h
a85e8e
@@ -69,8 +69,11 @@ enum grub_util_fd_open_flags_t
a85e8e
 
a85e8e
 #if defined (__MINGW32__) && !defined (__MINGW64__)
a85e8e
 
a85e8e
+/* 32 bit on MinGW-64 already redefines them if _FILE_OFFSET_BITS=64 */
a85e8e
+#if !defined(_FILE_OFFSET_BITS)
a85e8e
 #define fseeko fseeko64
a85e8e
 #define ftello ftello64
a85e8e
+#endif
a85e8e
 
a85e8e
 #endif
a85e8e
 
d41074
diff --git a/ChangeLog b/ChangeLog
d41074
index 8c1ececa1ed..e87f0a7a4a4 100644
d41074
--- a/ChangeLog
d41074
+++ b/ChangeLog
d41074
@@ -1,3 +1,8 @@
d41074
+2014-01-07  Andrey Borzenkov <arvidjaar@gmail.com>
d41074
+
d41074
+	* include/grub/osdep/hostfile_windows.h: Do not redefine fseeko/ftello
d41074
+	on MinGW-64 when compiling for 32 bits.
d41074
+
d41074
 2013-12-30  Andrey Borzenkov <arvidjaar@gmail.com>
d41074
 
d41074
 	* grub-core/Makefile.core.def: strip .eh_frame section for arm64-efi.