grub.300-honor_UCLIBC_HAS_LFS.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. diff -rup grub-0.97.orig/grub/asmstub.c grub-0.97/grub/asmstub.c
  2. --- grub-0.97.orig/grub/asmstub.c 2006-11-29 20:36:20.000000000 +0100
  3. +++ grub-0.97/grub/asmstub.c 2006-11-29 21:26:16.000000000 +0100
  4. @@ -18,10 +18,13 @@
  5. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  6. */
  7. +#include <features.h>
  8. +#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__)
  9. /* Try to use glibc's transparant LFS support. */
  10. #define _LARGEFILE_SOURCE 1
  11. /* lseek becomes synonymous with lseek64. */
  12. #define _FILE_OFFSET_BITS 64
  13. +#endif
  14. /* Simulator entry point. */
  15. int grub_stage2 (void);
  16. diff -rup grub-0.97.orig/lib/device.c grub-0.97/lib/device.c
  17. --- grub-0.97.orig/lib/device.c 2006-11-29 20:36:20.000000000 +0100
  18. +++ grub-0.97/lib/device.c 2006-11-29 21:25:19.000000000 +0100
  19. @@ -18,10 +18,13 @@
  20. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. */
  22. +#include <features.h>
  23. +#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__)
  24. /* Try to use glibc's transparant LFS support. */
  25. #define _LARGEFILE_SOURCE 1
  26. /* lseek becomes synonymous with lseek64. */
  27. #define _FILE_OFFSET_BITS 64
  28. +#endif
  29. #include <stdio.h>
  30. #include <stdlib.h>