Some systems require <unistd.h> to be included before <time.h> for
[kopensolaris-gnu/glibc.git] / time / strftime.c
index 438384c..69babad 100644 (file)
 #include <ctype.h>
 #include <sys/types.h>         /* Some systems define `time_t' here.  */
 
+/* Some systems require <unistd.h> to be included before <time.h>
+   for localtime_r to be declared properly.  */
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
 #ifdef TIME_WITH_SYS_TIME
 # include <sys/time.h>
 # include <time.h>