Skip to content
Snippets Groups Projects
Commit 9ca76efe authored by jow's avatar jow
Browse files

grub2: fix build against musl


Invert the `__GLIBC__` guards into `!__UCLIBC__` ones to avoid
invalid references to `_llseek` on musl.

Signed-off-by: default avatarJo-Philipp Wich <jow@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46125 3c298f89-4303-0410-b956-a3cf2f4a3e73
parent 3201df01
No related branches found
No related tags found
No related merge requests found
--- a/grub-core/osdep/unix/hostdisk.c
+++ b/grub-core/osdep/unix/hostdisk.c
@@ -48,11 +48,10 @@
#ifdef __linux__
# include <sys/ioctl.h> /* ioctl */
# include <sys/mount.h>
-# if !defined(__GLIBC__) || \
- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
+# if defined(__UCLIBC__)
/* Maybe libc doesn't have large file support. */
# include <linux/unistd.h> /* _llseek */
-# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
+# endif /* __UCLIBC__ */
#endif /* __linux__ */
grub_uint64_t
@@ -79,8 +78,7 @@ grub_util_get_fd_size (grub_util_fd_t fd
return st.st_size;
}
-#if defined(__linux__) && (!defined(__GLIBC__) || \
- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
+#if defined(__linux__) && defined(__UCLIBC__)
/* Maybe libc doesn't have large file support. */
int
grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment