From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Xu7XX-0003g1-On for mharc-grub-devel@gnu.org; Thu, 27 Nov 2014 17:27:55 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xu7XR-0003fT-8P for grub-devel@gnu.org; Thu, 27 Nov 2014 17:27:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xu7XM-0001jI-Bv for grub-devel@gnu.org; Thu, 27 Nov 2014 17:27:49 -0500 Received: from mx02.posteo.de ([89.146.194.165]:49335) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xu7XM-0001j6-4t for grub-devel@gnu.org; Thu, 27 Nov 2014 17:27:44 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by mx02.posteo.de (Postfix) with ESMTP id 3B6AE25A3DD8; Thu, 27 Nov 2014 23:27:42 +0100 (CET) X-Virus-Scanned: amavisd-new at posteo.de Received: from posteo.de ([10.125.125.178]) (using TLS) by localhost (amavis1.posteo.de [10.125.125.165]) (amavisd-new, port 10026) with ESMTPS id abqTPC5ek8LF; Thu, 27 Nov 2014 23:27:37 +0100 (CET) Received: from mail.posteo.de (localhost [127.0.0.1]) by mail.posteo.de (Postfix) with ESMTPSA id 3jpYWD48m0zPjk1; Thu, 27 Nov 2014 23:27:36 +0100 (CET) Date: Thu, 27 Nov 2014 23:27:05 +0100 From: Felix Janda To: Andrei Borzenkov Subject: Re: grub-core/osdep/unix/hostdisk.c: remove support for ancient glibc Message-ID: <20141127222704.GA6207@euler> References: <20141121200040.GA4858@euler> <20141127173456.598c173a@opensuse.site> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20141127173456.598c173a@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: grub-devel@gnu.org, daggs 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: Thu, 27 Nov 2014 22:27:54 -0000 Andrei Borzenkov wrote: > =D0=92 Fri, 21 Nov 2014 21:00:41 +0100 > Felix Janda =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >=20 > > Hello, > >=20 > > the file grub-core/osdep/unix/hostdisk.c has special code for glibc<2= .1, > > which gets also pulled in for other libcs (such as musl libc) and mak= es > > compilation fail for them because the code uses glibc internals. The > > easiest way to fix is just to remove the code as the below patch does= . > >=20 >=20 > Could you replace glibc version check with configure test for llseek? > This should cover your case as well. There is no llseek. Testing for lseek will likely also succeed for old glibc. I think that one rather needs to check whether its prototype is correct. I don't think that the code behind !defined(__GLIBC__) ... is useful for anything other than glibc<2.1. It seems to use old glibc internals. (Notice that glibc-2.1 is from 1999.) If the code should be kept in, it should IMO be conditional on=20 ((__GLIBC__ < 2) || ((__GLIBC__ =3D=3D 2) && (__GLIBC_MINOR__ < 1))) Felix