[PATCH] fallocate: pass off_t in register pair correctly for 64-bit off_t

Yury Norov ynorov@caviumnetworks.com
Fri Jun 24 08:54:00 GMT 2016


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.



More information about the Libc-alpha mailing list