[PATCH] Add rpmatch(3)

Alan Lawrence alan.lawrence@arm.com
Thu Nov 19 15:31:00 GMT 2015


On 19/11/15 12:42, Corinna Vinschen wrote:
> 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:
>>
>> /work/alalaw01/build2-aarch64-none-elf/obj/gcc1/gcc/xgcc
>> -B/work/alalaw01/build2-aarch64-none-elf/obj/gcc1/gcc/ -B/work/alalaw01/build2-aarch64-none-elf/obj/binutils/aarch64-none-elf/ilp32/newlib/
>> -isystem /work/alalaw01/build2-aarch64-none-elf/obj/binutils/aarch64-none-elf/ilp32/newlib/targ-include
>> -isystem /work/alalaw01/src2/binutils-gdb/newlib/libc/include -B/work/alalaw01/build2-aarch64-none-elf/obj/binutils/aarch64-none-elf/ilp32/libgloss/aarch64 -L/work/alalaw01/build2-aarch64-none-elf/obj/binutils/aarch64-none-elf/ilp32/libgloss/libnosys
>> -L/work/alalaw01/src2/binutils-gdb/libgloss/aarch64
>> -L/work/alalaw01/build2-aarch64-none-elf/obj/binutils/./ld  -mabi=ilp32 -I.
>> -I/work/alalaw01/src2/binutils-gdb/newlib/libc/stdlib -D__NO_SYSCALLS__
>> -fno-builtin      -O2 -g  -mabi=ilp32 -c -o lib_a-rpmatch.o `test -f
>> 'rpmatch.c' || echo
>> '/work/alalaw01/src2/binutils-gdb/newlib/libc/stdlib/'`rpmatch.c
>> 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>
>
>
> Corinna
>


Erm, yes. It really is as simple as that, sorry for not spotting myself...

I haven't evaluated whether this causes problems in other platforms/situations, 
but it would be great to have that committed :)

Thanks,
Alan



More information about the Newlib mailing list