From patchwork Thu Jun 25 09:51:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Neukirchen X-Patchwork-Id: 488325 X-Patchwork-Delegate: jow@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DDC5A1402C3 for ; Thu, 25 Jun 2015 19:52:38 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id E5EB528017A; Thu, 25 Jun 2015 11:52:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 102FE28013B for ; Thu, 25 Jun 2015 11:52:13 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from mout.web.de (mout.web.de [212.227.17.12]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 25 Jun 2015 11:52:10 +0200 (CEST) Received: from [192.168.3.157] ([91.66.247.224]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0M73SD-1YvUaU3axJ-00wlNK for ; Thu, 25 Jun 2015 11:52:19 +0200 To: OpenWrt Development List From: Dirk Neukirchen Message-ID: <558BCF23.40304@web.de> Date: Thu, 25 Jun 2015 11:51:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 X-Provags-ID: V03:K0:iEUW/E4LKT0maG7NUp4OBrVCvo/AUm1gSICwwysCtRdKVu7bKcR hW2MXTNR8SmyjpWCSoQlrrResKl8bOqfWuy7b8oG8axyNpOjcnupQkYOoF+Nho8XDmBLxEN 2ngUoRMw7tikyN8QlbKaTI50Wgz/WGQSLMVj/WQXK4VkkUrmyS8122Va22mASNPmbsPXxCT Lpyp3P+kYgjrpMrWbCBDg== X-UI-Out-Filterresults: notjunk:1; V01:K0:AC7KKBKK9/0=:7gOuAClKgM0bzEJy2GNNMN QMpE1KZqOvT0jXj45ZQXMuQTppVHY+lmtKWP/dBLhWi3UggeZFHE4uA05DUDmlMl8dKUQ+CC7 /4RLqg7yZqIrl0S/96U2TIerFxztVXrVxajB93fJOwl2oPIygACfTKsLunqstXjL+32RiezsT bU2cSgv+anYaJKTh41HwnFkzg2b/jRdja/eAMVRCbnzlaCiG2LcWGrkcy8KH4OdoQboQ6w3Y0 F7el3HeIc7CCKUVGl4DIzM6KgoEooXV33/dR9gPqeDuNRdY1a/zkK4HIWFRfRhGSwN2/ZSAXC ttiitolc75f3uwPeRv7fClS0owsVarR4zkiPnceD610hO8L6/VmRrSCMWHXPFVZB5Uds25mf5 XHdcNpWXhAJb6qTJMPTcpB8fydvh8n1fM+VA5gkKki48NB4OVKzuKcCob599AbiI+SpiTGqqa OKQOeCmHZg+c10frGbeWyEqkUQokf7DSGStdcuPuXtuEQkqPYFd24Z/i3g+3NHasUMQkhUFHS 7M/pwn19HbOjsoOqy0kOtu1wJODWsmsI39/PTxdMsi2Rfkez7iq7iSP7ZH2n6xr9uzcFVd946 ooyZih/VKnuI7NvZNkIsRDC/cakHvm7b73kajpXXXxYw5JNup8bIzqG8tAlfRzEsZUB02rOvr nsUkLEB3GmJ4nPR+15RXq3+ICRTUnvLp9hQtHipUwrymOmzzTMlhDupsXfpWcRyYbsrk= Subject: [OpenWrt-Devel] [PATCH] [package] grub2: fix musl build X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" fixes compile error: grub-core/osdep/unix/hostdisk.c: In function 'grub_util_fd_seek': grub-core/osdep/unix/hostdisk.c:89:14: error: invalid storage class for function '_llseek' static int _llseek (uint filedes, ulong hi, ulong lo, Signed-off-by: Dirk Neukirchen --- package/boot/grub2/patches/001-grub-musl.patch | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 package/boot/grub2/patches/001-grub-musl.patch diff --git a/package/boot/grub2/patches/001-grub-musl.patch b/package/boot/grub2/patches/001-grub-musl.patch new file mode 100644 index 0000000..daba87f --- /dev/null +++ b/package/boot/grub2/patches/001-grub-musl.patch @@ -0,0 +1,47 @@ +--- a/grub-core/osdep/unix/hostdisk.c ++++ b/grub-core/osdep/unix/hostdisk.c +@@ -48,11 +48,6 @@ + #ifdef __linux__ + # include /* ioctl */ + # include +-# if !defined(__GLIBC__) || \ +- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))) +-/* Maybe libc doesn't have large file support. */ +-# include /* _llseek */ +-# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */ + #endif /* __linux__ */ + + grub_uint64_t +@@ -79,24 +74,6 @@ 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)))) +- /* Maybe libc doesn't have large file support. */ +-int +-grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off) +-{ +- loff_t offset, result; +- static int _llseek (uint filedes, ulong hi, ulong lo, +- loff_t *res, uint wh); +- _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo, +- loff_t *, res, uint, wh); +- +- offset = (loff_t) off; +- if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET)) +- return -1; +- return GRUB_ERR_NONE; +-} +-#else + int + grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off) + { +@@ -107,7 +84,6 @@ grub_util_fd_seek (grub_util_fd_t fd, gr + + return 0; + } +-#endif + + + /* Read LEN bytes from FD in BUF. Return less than or equal to zero if an