kumquat-buildroot/boot/grub/grub.300-honor_UCLIBC_HAS_LFS.patch
Thomas Petazzoni a79ea8a60b grub: bump to 0.97-67
Bump to a more recent version of the Debian patches for grub legacy,
that fix an incorrect build with gcc 4.6.

Fixes #6092 and #2629.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-07 10:22:35 +01:00

37 lines
1.1 KiB
Diff

Index: b/grub/asmstub.c
===================================================================
--- a/grub/asmstub.c
+++ b/grub/asmstub.c
@@ -18,10 +18,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <features.h>
+#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__)
/* Try to use glibc's transparant LFS support. */
#define _LARGEFILE_SOURCE 1
/* lseek becomes synonymous with lseek64. */
#define _FILE_OFFSET_BITS 64
+#endif
/* Simulator entry point. */
int grub_stage2 (void);
Index: b/lib/device.c
===================================================================
--- a/lib/device.c
+++ b/lib/device.c
@@ -18,10 +18,13 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <features.h>
+#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__)
/* Try to use glibc's transparant LFS support. */
#define _LARGEFILE_SOURCE 1
/* lseek becomes synonymous with lseek64. */
#define _FILE_OFFSET_BITS 64
+#endif
#include <stdio.h>
#include <stdlib.h>