diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-11-29 20:26:05 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-11-29 20:26:05 +0000 |
commit | eb3b21be72f48bf0461f9fa1721b797783e59172 (patch) | |
tree | 85fe10ef3d896ceae4289912293c01280541e48d | |
parent | 1d10f37b2e1ed5abf60d903eefe471cd7a8ce58e (diff) | |
download | buildroot-novena-eb3b21be72f48bf0461f9fa1721b797783e59172.tar.gz buildroot-novena-eb3b21be72f48bf0461f9fa1721b797783e59172.zip |
- honor uclibc's notion of LFS support
-rw-r--r-- | target/x86/grub/grub.300-honor_UCLIBC_HAS_LFS.patch | 34 | ||||
-rw-r--r-- | target/x86/grub/grub.mk | 4 |
2 files changed, 38 insertions, 0 deletions
diff --git a/target/x86/grub/grub.300-honor_UCLIBC_HAS_LFS.patch b/target/x86/grub/grub.300-honor_UCLIBC_HAS_LFS.patch new file mode 100644 index 000000000..5b941865b --- /dev/null +++ b/target/x86/grub/grub.300-honor_UCLIBC_HAS_LFS.patch @@ -0,0 +1,34 @@ +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> diff --git a/target/x86/grub/grub.mk b/target/x86/grub/grub.mk index 8e4bd575e..af3ce6da0 100644 --- a/target/x86/grub/grub.mk +++ b/target/x86/grub/grub.mk @@ -36,6 +36,10 @@ GRUB_TARGET_FILES+=$(GRUB_SPLASHIMAGE) endif GRUB_CFLAGS=-DSUPPORT_LOOPDEV +ifeq ($(BR2_LARGEFILE),) +GRUB_CFLAGS+=-U_FILE_OFFSET_BITS +endif + $(DL_DIR)/$(GRUB_SOURCE): $(WGET) -P $(DL_DIR) $(GRUB_SITE)/$(GRUB_SOURCE) |