From f804f416f3012d6bb16b27d0fc9b338a7fb50a21 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 26 Jun 2012 16:03:12 +0000 Subject: * libc/include/sys/types.h: Don't use the same preprocessor guard for time_t, timespec, and itimerspec. Add a separate guard specifically for timespec and always unconditionally define itimerspec. --- newlib/libc/include/sys/types.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'newlib/libc') diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h index 9723d92d3..73e4ed878 100644 --- a/newlib/libc/include/sys/types.h +++ b/newlib/libc/include/sys/types.h @@ -109,19 +109,22 @@ typedef _CLOCK_T_ clock_t; #ifndef __time_t_defined typedef _TIME_T_ time_t; #define __time_t_defined +#endif +#ifndef __timespec_defined +#define __timespec_defined /* Time Value Specification Structures, P1003.1b-1993, p. 261 */ struct timespec { time_t tv_sec; /* Seconds */ long tv_nsec; /* Nanoseconds */ }; +#endif struct itimerspec { struct timespec it_interval; /* Timer period */ struct timespec it_value; /* Timer expiration */ }; -#endif typedef long daddr_t; typedef char * caddr_t; -- cgit v1.2.3