grub.300-honor_UCLIBC_HAS_LFS.patch 1.1 KB

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