summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/bits/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits/time.h')
-rw-r--r--sysdeps/unix/sysv/linux/bits/time.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/time.h b/sysdeps/unix/sysv/linux/bits/time.h
index 3c1b27a1bb..274d616777 100644
--- a/sysdeps/unix/sysv/linux/bits/time.h
+++ b/sysdeps/unix/sysv/linux/bits/time.h
@@ -42,9 +42,11 @@
# endif /* bits/time.h */
#endif
-#ifndef _STRUCT_TIMEVAL
-# define _STRUCT_TIMEVAL 1
-# include <bits/types.h>
+#ifdef __need_timeval
+# undef __need_timeval
+# ifndef _STRUCT_TIMEVAL
+# define _STRUCT_TIMEVAL 1
+# include <bits/types.h>
/* A time value that is accurate to the nearest
microsecond but also has a range of years. */
@@ -53,4 +55,5 @@ struct timeval
__time_t tv_sec; /* Seconds. */
__time_t tv_usec; /* Microseconds. */
};
-#endif /* struct timeval */
+# endif /* struct timeval */
+#endif /* need timeval */