This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[PATCH] Work-around to prevent an error (Cross-compiler-build) about caddr_t
- From: Markus Eisenmann <meisenmann dot lba at fh-salzburg dot ac dot at>
- To: newlib at sourceware dot org
- Date: Tue, 28 Jan 2014 09:57:48 +0100 (CET)
- Subject: [PATCH] Work-around to prevent an error (Cross-compiler-build) about caddr_t
- Authentication-results: sourceware.org; auth=none
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
Best regards from Salzburg,
Markus