All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Janda <felix.janda@posteo.de>
To: Andrei Borzenkov <arvidjaar@gmail.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: grub-core/osdep/unix/hostdisk.c: remove support for ancient glibc
Date: Fri, 5 Dec 2014 18:50:16 +0100	[thread overview]
Message-ID: <20141205175016.GA6022@euler> (raw)
In-Reply-To: <20141205145229.7bc61b61@opensuse.site>

Andrei Borzenkov wrote:
> В Thu, 4 Dec 2014 23:21:09 +0100
> Felix Janda <felix.janda@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)


  reply	other threads:[~2014-12-05 17:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21 20:00 grub-core/osdep/unix/hostdisk.c: remove support for ancient glibc Felix Janda
2014-11-22  8:59 ` Felix Janda
2014-11-27 14:34 ` Andrei Borzenkov
2014-11-27 22:27   ` Felix Janda
2014-11-28 19:18 ` Vladimir 'φ-coder/phcoder' Serbinenko
2014-12-04 22:21   ` Felix Janda
2014-12-05 11:52     ` Andrei Borzenkov
2014-12-05 17:50       ` Felix Janda [this message]
2014-12-07 16:24     ` Vladimir 'φ-coder/phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141205175016.GA6022@euler \
    --to=felix.janda@posteo.de \
    --cc=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.