[PATCH] Work-around to prevent an error (Cross-compiler-build) about caddr_t
Corinna Vinschen
vinschen@redhat.com
Tue Jan 28 11:18:00 GMT 2014
On Jan 28 09:57, Markus Eisenmann wrote:
>
> Hi!
>
> Building a cross-compiler of GCC (based on mingw-host) will end with a compiler-error, because
> (in this case) the GCC-build uses a generated header-file which defines a macro for caddr_t .
>
> Caused by wrong detection wheter caddr_t is already known; autotools is checking the
> host header-files and not newlib provided definitions :-)
>
> Up to now, I've used a small patch on sys\types.h as work-around; I.e. undefining caddr_t
>
> Maybe this should be included in the trunk ... :
>
> --- sys\types.h 2013-11-30 00:14:00 +0000
> +++ sys\types.h 2014-01-10 12:52:00 +0000
> @@ -143,6 +143,7 @@
> #define __daddr_t_defined
> #endif
> #ifndef __caddr_t_defined
> +#undef caddr_t
> typedef char * caddr_t;
> #define __caddr_t_defined
> #endif
IMHO the real fix would be to make sure autotools checks against the
correct headers.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20140128/ded187eb/attachment.sig>
More information about the Newlib
mailing list