From 0b78da0365f4b4a627a7bdf40f967fb5660de9be Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 25 Oct 1998 09:09:44 +0000 Subject: [PATCH] (timeval): Protect with __need_timeval. --- sysdeps/unix/sysv/linux/alpha/bits/time.h | 12 +++++++----- sysdeps/unix/sysv/linux/mips/bits/time.h | 9 ++++++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index acb2b41..f44b5dc 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -42,10 +42,11 @@ # endif /* bits/time.h */ #endif /* !__need_timeval */ - -#ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 -# include +#ifdef __need_timeval +# undef __need_timeval +# ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 +# include /* A time value that is accurate to the nearest microsecond but also has a range of years. */ @@ -54,4 +55,5 @@ struct timeval __time_t tv_sec; /* Seconds. */ __time_t tv_usec; /* Microseconds. */ }; -#endif /* struct timeval */ +# endif /* struct timeval */ +#endif /* need timeval */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/time.h b/sysdeps/unix/sysv/linux/mips/bits/time.h index 91dc65c..15c7cb3 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/time.h +++ b/sysdeps/unix/sysv/linux/mips/bits/time.h @@ -42,8 +42,10 @@ # endif /* bits/time.h */ #endif -#ifndef _STRUCT_TIMEVAL -# define _STRUCT_TIMEVAL 1 +#ifdef __need_timeval +# undef __need_timeval +# ifndef _STRUCT_TIMEVAL +# define _STRUCT_TIMEVAL 1 /* A time value that is accurate to the nearest microsecond but also has a range of years. */ struct timeval @@ -51,4 +53,5 @@ struct timeval long int tv_sec; /* Seconds. */ long int tv_usec; /* Microseconds. */ }; -#endif /* struct timeval */ +# endif /* struct timeval */ +#endif /* need timeval */ -- 2.7.4