From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Xwx2R-0005ox-02 for mharc-grub-devel@gnu.org; Fri, 05 Dec 2014 12:51:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xwx2K-0005gn-7Q for grub-devel@gnu.org; Fri, 05 Dec 2014 12:51:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xwx2B-0006c7-ID for grub-devel@gnu.org; Fri, 05 Dec 2014 12:51:24 -0500 Received: from mx02.posteo.de ([89.146.194.165]:34537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xwx2B-0006bn-DS for grub-devel@gnu.org; Fri, 05 Dec 2014 12:51:15 -0500 Received: from dovecot03.posteo.de (unknown [185.67.36.28]) by mx02.posteo.de (Postfix) with ESMTPS id 8DB1F25ACC2D; Fri, 5 Dec 2014 18:51:14 +0100 (CET) Received: from mail.posteo.de (localhost [127.0.0.1]) by dovecot03.posteo.de (Postfix) with ESMTPSA id 3jvM0J4kcHz5vND; Fri, 5 Dec 2014 18:50:56 +0100 (CET) Date: Fri, 5 Dec 2014 18:50:16 +0100 From: Felix Janda To: Andrei Borzenkov Subject: Re: grub-core/osdep/unix/hostdisk.c: remove support for ancient glibc Message-ID: <20141205175016.GA6022@euler> References: <20141121200040.GA4858@euler> <5478CA6D.9020904@gmail.com> <20141204222109.GA30539@euler> <20141205145229.7bc61b61@opensuse.site> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20141205145229.7bc61b61@opensuse.site> User-Agent: Mutt/1.5.22 (2013-10-16) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 89.146.194.165 Cc: The development of GNU GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 17:51:30 -0000 Andrei Borzenkov wrote: > =D0=92 Thu, 4 Dec 2014 23:21:09 +0100 > Felix Janda =D0=BF=D0=B8=D1=88=D0=B5=D1=82: [..] > > Another solution I would be happy with, is to change the conditions > >=20 > > # if !defined(__GLIBC__) || \ > > ((__GLIBC__ < 2) || ((__GLIBC__ =3D=3D 2) && (__GLIBC_MINOR__= < 1))) > >=20 > > to > >=20 > > # ((__GLIBC__ < 2) || ((__GLIBC__ =3D=3D 2) && (__GLIBC_MINOR__ < 1))= ) > >=20 >=20 > This will likely result in build error if __GLIBC__ is undefined. Right, the condition is wrong if __GLIBC__ is undefined. How about the below patch? Felix --- a/grub-2.02~beta2/grub-core/osdep/unix/hostdisk.c +++ b/grub-2.02~beta2/grub-core/osdep/unix/hostdisk.c @@ -48,7 +48,7 @@ #ifdef __linux__ # include /* ioctl */ # include -# if !defined(__GLIBC__) || \ +# if defined(__GLIBC__) && \ ((__GLIBC__ < 2) || ((__GLIBC__ =3D=3D 2) && (__GLIBC_MINOR__ < = 1))) /* Maybe libc doesn't have large file support. */ # include /* _llseek */ @@ -79,8 +79,8 @@ return st.st_size; } =20 -#if defined(__linux__) && (!defined(__GLIBC__) || \ - ((__GLIBC__ < 2) || ((__GLIBC__ =3D=3D 2) && (__GLIBC_MINOR__ < = 1)))) +#if defined(__linux__) && defined(__GLIBC__) && \ + ((__GLIBC__ < 2) || ((__GLIBC__ =3D=3D 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)