website: manual: refresh qi.html to be reflected on the website
[dragora.git] / patches / grub / OpenWrt-Devel-package-grub2-fix-musl-build.patch
blobd8db227e9e00fb1a265a06019f32e388799d3253
1 From patchwork Thu Jun 25 09:51:31 2015
2 Content-Type: text/plain; charset="utf-8"
3 MIME-Version: 1.0
4 Content-Transfer-Encoding: 7bit
5 Subject: [OpenWrt-Devel,package] grub2: fix musl build
6 X-Patchwork-Submitter: Dirk Neukirchen <dirkneukirchen@web.de>
7 X-Patchwork-Id: 488325
8 X-Patchwork-Delegate: jow@openwrt.org
9 Message-Id: <558BCF23.40304@web.de>
10 To: OpenWrt Development List <openwrt-devel@lists.openwrt.org>
11 Date: Thu, 25 Jun 2015 11:51:31 +0200
12 From: Dirk Neukirchen <dirkneukirchen@web.de>
13 List-Id: OpenWrt Development List <openwrt-devel.lists.openwrt.org>
15 fixes compile error:
16 grub-core/osdep/unix/hostdisk.c: In function 'grub_util_fd_seek':
17 grub-core/osdep/unix/hostdisk.c:89:14: error: invalid storage class for function '_llseek'
18 static int _llseek (uint filedes, ulong hi, ulong lo,
20 Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>
21 ---
22 package/boot/grub2/patches/001-grub-musl.patch | 47 ++++++++++++++++++++++++++
23 1 file changed, 47 insertions(+)
24 create mode 100644 package/boot/grub2/patches/001-grub-musl.patch
26 diff --git a/package/boot/grub2/patches/001-grub-musl.patch b/package/boot/grub2/patches/001-grub-musl.patch
27 new file mode 100644
28 index 0000000..daba87f
29 --- /dev/null
30 +++ b/package/boot/grub2/patches/001-grub-musl.patch
31 @@ -0,0 +1,47 @@
32 +--- a/grub-core/osdep/unix/hostdisk.c
33 ++++ b/grub-core/osdep/unix/hostdisk.c
34 +@@ -48,11 +48,6 @@
35 + #ifdef __linux__
36 + # include <sys/ioctl.h> /* ioctl */
37 + # include <sys/mount.h>
38 +-# if !defined(__GLIBC__) || \
39 +- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
40 +-/* Maybe libc doesn't have large file support. */
41 +-# include <linux/unistd.h> /* _llseek */
42 +-# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
43 + #endif /* __linux__ */
45 + grub_uint64_t
46 +@@ -79,24 +74,6 @@ grub_util_get_fd_size (grub_util_fd_t fd
47 + return st.st_size;
48 + }
50 +-#if defined(__linux__) && (!defined(__GLIBC__) || \
51 +- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
52 +- /* Maybe libc doesn't have large file support. */
53 +-int
54 +-grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off)
55 +-{
56 +- loff_t offset, result;
57 +- static int _llseek (uint filedes, ulong hi, ulong lo,
58 +- loff_t *res, uint wh);
59 +- _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo,
60 +- loff_t *, res, uint, wh);
62 +- offset = (loff_t) off;
63 +- if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET))
64 +- return -1;
65 +- return GRUB_ERR_NONE;
66 +-}
67 +-#else
68 + int
69 + grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off)
70 + {
71 +@@ -107,7 +84,6 @@ grub_util_fd_seek (grub_util_fd_t fd, gr
73 + return 0;
74 + }
75 +-#endif
78 + /* Read LEN bytes from FD in BUF. Return less than or equal to zero if an