This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] fallocate: pass off_t in register pair correctly for 64-bit off_t
- From: Yury Norov <ynorov at caviumnetworks dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: <libc-alpha at sourceware dot org>, <cmetcalf at tilera dot com>, <pinskia at gmail dot com>, <cmetcalf at mellanox dot com>
- Date: Fri, 24 Jun 2016 11:53:50 +0300
- Subject: Re: [PATCH] fallocate: pass off_t in register pair correctly for 64-bit off_t
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp dot mailfrom=Yuri dot Norov at caviumnetworks dot com;
- References: <1466746995-25982-1-git-send-email-ynorov at caviumnetworks dot com> <alpine dot DEB dot 2 dot 20 dot 1606240733150 dot 22800 at digraph dot polyomino dot org dot uk>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Fri, Jun 24, 2016 at 07:35:09AM +0000, Joseph Myers wrote:
> On Fri, 24 Jun 2016, Yury Norov wrote:
>
> > diff --git a/sysdeps/unix/sysv/linux/fallocate.c b/sysdeps/unix/sysv/linux/fallocate.c
> > index 6a58a5f..8a7149f 100644
> > --- a/sysdeps/unix/sysv/linux/fallocate.c
> > +++ b/sysdeps/unix/sysv/linux/fallocate.c
> > @@ -15,6 +15,7 @@
> > License along with the GNU C Library; if not, see
> > <http://www.gnu.org/licenses/>. */
> >
> > +#ifndef __OFF_T_MATCHES_OFF64_T
> > #include <errno.h>
>
> Does the header defining this macro get included implicitly from the
> command line? If not, you need to include appropriate headers before
> testing it.... (It might be a good idea, before doing anything more based
> on such macros, to do a preparatory patch series converting them to 0/1
> form with #if used, instead of undefined/defined with #ifdef, so that
> -Werror -Wundef detects any cases where required headers are not
> included.)
>
> --
> Joseph S. Myers
> joseph@codesourcery.com
Thank you, I'll #include <sys/types> for it.