https://sourceware.org/ml/newlib/2015/msg00520.html describes
how sys/time.h uses __BSD_VISIBLE while the types used in the
affected inline functions are guarded with !_POSIX_SOURCE.
Fix that by guarding the type with __BSD_VISIBLE as well.
* 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.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
+2015-07-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * 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 <sebastian.huber@embedded-brains.de>
* libc/stdio/fputs.c (_puts_r): Add missing CHECK_INIT().
#define _SYS_TIME_H_
#include <_ansi.h>
+#include <sys/cdefs.h>
#include <sys/_timeval.h>
#include <sys/types.h>
#include <sys/timespec.h>
#ifndef _SYS_TYPES_H
#include <_ansi.h>
+# include <sys/cdefs.h>
#ifndef __INTTYPES_DEFINED__
#define __INTTYPES_DEFINED__
#define _ST_INT32
#endif
-# ifndef _POSIX_SOURCE
+# if __BSD_VISIBLE
# define physadr physadr_t
# define quad quad_t
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;