kumquat-buildroot/target/x86/grub/grub.300-honor_UCLIBC_HAS_LFS.patch
Peter Korsgaard c4cd1bcb84 grub: revert r21974 (features.h should never be included explicitly)
features.h (or something including it) is needed for __UCLIBC* to get
defined - E.G. without that the build breaks without largefile support.

Nigel, what was the reason for your commit and what file not found error
did you see?
2009-01-31 12:30:02 +00:00

35 lines
1.2 KiB
Diff

diff -rup grub-0.97.orig/grub/asmstub.c grub-0.97/grub/asmstub.c
--- grub-0.97.orig/grub/asmstub.c 2006-11-29 20:36:20.000000000 +0100
+++ grub-0.97/grub/asmstub.c 2006-11-29 21:26:16.000000000 +0100
@@ -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);
diff -rup grub-0.97.orig/lib/device.c grub-0.97/lib/device.c
--- grub-0.97.orig/lib/device.c 2006-11-29 20:36:20.000000000 +0100
+++ grub-0.97/lib/device.c 2006-11-29 21:25:19.000000000 +0100
@@ -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>