This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] Add rpmatch(3)
- From: Yaakov Selkowitz <yselkowi at redhat dot com>
- To: newlib at sourceware dot org
- Date: Fri, 20 Nov 2015 02:35:28 -0500 (EST)
- Subject: Re: [PATCH] Add rpmatch(3)
- Authentication-results: sourceware.org; auth=none
- References: <20151118092839 dot GP6402 at calimero dot vinschen dot de> <564DAFEF dot 2070409 at arm dot com> <20151119124233 dot GA2755 at calimero dot vinschen dot de>
----- Original Message -----
> On Nov 19 11:18, Alan Lawrence wrote:
> > Hi,
> >
> > I'm trying to build cross-toolchains for aarch64-none-elf and
> > arm-none-eabi,
> > and since this patch, newlib has been failing to build with:
> >
> > In file included from
> > /work/alalaw01/src2/binutils-gdb/newlib/libc/stdlib/rpmatch.c:62:0:
> > /work/alalaw01/src2/binutils-gdb/newlib/libc/include/regex.h:43:9: error:
> > unknown type name 'off_t'
> > typedef off_t regoff_t;
> > ^~~~~
>
> Does this patch help?
>
> diff --git a/newlib/libc/stdlib/rpmatch.c b/newlib/libc/stdlib/rpmatch.c
> index 879d1f3..0bbdf43 100644
> --- a/newlib/libc/stdlib/rpmatch.c
> +++ b/newlib/libc/stdlib/rpmatch.c
> @@ -57,6 +57,7 @@ No supporting OS subroutines are required.
> */
>
> #include <sys/cdefs.h>
> +#include <sys/types.h>
>
> #include <langinfo.h>
> #include <regex.h>
Wouldn't the correct fix be for libc/include/regex.h to #include <sys/types.h>,
or (as on Cygwin) use #include <sys/_types.h> and _off_t?
--
Yaakov Selkowitz
Associate Software Engineer, ARM
Red Hat, Inc.