grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub-core/osdep/unix/hostdisk.c: remove support for ancient glibc


From: Felix Janda
Subject: Re: grub-core/osdep/unix/hostdisk.c: remove support for ancient glibc
Date: Thu, 27 Nov 2014 23:27:05 +0100
User-agent: Mutt/1.5.22 (2013-10-16)

Andrei Borzenkov wrote:
> В Fri, 21 Nov 2014 21:00:41 +0100
> Felix Janda <address@hidden> пишет:
> 
> > Hello,
> > 
> > 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 makes
> > 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.
> > 
> 
> 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 

((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))


Felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]