This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add rpmatch(3)


----- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]