diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-06-25 11:19:23 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-06-25 11:19:23 +0000 |
commit | c80033c2b34f20a2a80a1ae8583d11784aee8094 (patch) | |
tree | 3aa2634e47d47214e6cb1a08b1e59000fc11daae /package/boot/grub2/patches | |
parent | 20af9ba6fa7270f6533e896a1b97378012a687c9 (diff) | |
download | master-187ad058-c80033c2b34f20a2a80a1ae8583d11784aee8094.tar.gz master-187ad058-c80033c2b34f20a2a80a1ae8583d11784aee8094.tar.bz2 master-187ad058-c80033c2b34f20a2a80a1ae8583d11784aee8094.zip |
grub2: fix build against musl
Invert the `__GLIBC__` guards into `!__UCLIBC__` ones to avoid
invalid references to `_llseek` on musl.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46125 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/boot/grub2/patches')
-rw-r--r-- | package/boot/grub2/patches/100-musl-compat.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/package/boot/grub2/patches/100-musl-compat.patch b/package/boot/grub2/patches/100-musl-compat.patch new file mode 100644 index 0000000000..e3b12be58a --- /dev/null +++ b/package/boot/grub2/patches/100-musl-compat.patch @@ -0,0 +1,26 @@ +--- 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) |