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: Joseph Myers <joseph at codesourcery dot com>
- To: Yury Norov <ynorov at caviumnetworks 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 07:35:09 +0000
- Subject: Re: [PATCH] fallocate: pass off_t in register pair correctly for 64-bit off_t
- Authentication-results: sourceware.org; auth=none
- References: <1466746995-25982-1-git-send-email-ynorov at caviumnetworks dot com>
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