[PATCH] Work-around to prevent an error (Cross-compiler-build) about caddr_t

Markus Eisenmann meisenmann.lba@fh-salzburg.ac.at
Tue Jan 28 08:58:00 GMT 2014


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 



More information about the Newlib mailing list