Andrei Borzenkov wrote: > В Thu, 4 Dec 2014 23:21:09 +0100 > Felix Janda <felix.ja...@posteo.de> пишет: [..] > > Another solution I would be happy with, is to change the conditions > > > > # if !defined(__GLIBC__) || \ > > ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))) > > > > to > > > > # ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))) > > > > 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 <sys/ioctl.h> /* ioctl */ # include <sys/mount.h> -# if !defined(__GLIBC__) || \ +# if defined(__GLIBC__) && \ ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))) /* Maybe libc doesn't have large file support. */ # include <linux/unistd.h> /* _llseek */ @@ -79,8 +79,8 @@ return st.st_size; } -#if defined(__linux__) && (!defined(__GLIBC__) || \ - ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))) +#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) _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel