diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 9ada9de83..994f1ca0e 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2015-07-06 Corinna Vinschen + + * libc/include/sys/time.h: Explicitely include sys/cdefs.h. + * libc/include/sys/types.h: Ditto. Guard BSD convenience base types + with __BSD_VISIBLE rather than !_POSIX_SOURCE. + 2015-07-01 Sebastian Huber * libc/stdio/fputs.c (_puts_r): Add missing CHECK_INIT(). diff --git a/newlib/libc/include/sys/time.h b/newlib/libc/include/sys/time.h index e95240e60..7e7205bd8 100644 --- a/newlib/libc/include/sys/time.h +++ b/newlib/libc/include/sys/time.h @@ -38,6 +38,7 @@ #define _SYS_TIME_H_ #include <_ansi.h> +#include #include #include #include diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index 9fe2f5de1..d8d6fdcb2 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -18,6 +18,7 @@ #ifndef _SYS_TYPES_H #include <_ansi.h> +# include #ifndef __INTTYPES_DEFINED__ #define __INTTYPES_DEFINED__ @@ -83,7 +84,7 @@ typedef quad_t * qaddr_t; #define _ST_INT32 #endif -# ifndef _POSIX_SOURCE +# if __BSD_VISIBLE # define physadr physadr_t # define quad quad_t @@ -112,7 +113,7 @@ typedef unsigned long u_long; typedef unsigned short ushort; /* System V compatibility */ typedef unsigned int uint; /* System V compatibility */ typedef unsigned long ulong; /* System V compatibility */ -# endif /*!_POSIX_SOURCE */ +# endif /*__BSD_VISIBLE */ #ifndef __clock_t_defined typedef _CLOCK_T_ clock_t;