about summary refs log tree commit diff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/strftime.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/time/strftime.c b/time/strftime.c
index 02f72b3164..8c5e0cba9e 100644
--- a/time/strftime.c
+++ b/time/strftime.c
@@ -31,7 +31,17 @@ Cambridge, MA 02139, USA.  */
 
 #include <stdio.h>
 #include <sys/types.h>		/* Some systems define `time_t' here.  */
-#include <time.h>
+
+#ifdef TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# ifdef HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
 
 #if HAVE_MBLEN
 # include <ctype.h>