100-musl-compat.patch 931 B

1234567891011121314151617181920212223242526
  1. --- a/grub-core/osdep/unix/hostdisk.c
  2. +++ b/grub-core/osdep/unix/hostdisk.c
  3. @@ -48,11 +48,10 @@
  4. #ifdef __linux__
  5. # include <sys/ioctl.h> /* ioctl */
  6. # include <sys/mount.h>
  7. -# if !defined(__GLIBC__) || \
  8. - ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
  9. +# if defined(__UCLIBC__)
  10. /* Maybe libc doesn't have large file support. */
  11. # include <linux/unistd.h> /* _llseek */
  12. -# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
  13. +# endif /* __UCLIBC__ */
  14. #endif /* __linux__ */
  15. grub_uint64_t
  16. @@ -79,8 +78,7 @@ grub_util_get_fd_size (grub_util_fd_t fd
  17. return st.st_size;
  18. }
  19. -#if defined(__linux__) && (!defined(__GLIBC__) || \
  20. - ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
  21. +#if defined(__linux__) && defined(__UCLIBC__)
  22. /* Maybe libc doesn't have large file support. */
  23. int
  24. grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off)