summaryrefslogtreecommitdiff
path: root/lib/strftime.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/strftime.c')
-rw-r--r--lib/strftime.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/strftime.c b/lib/strftime.c
index 519c2998e..33dec1328 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -48,6 +48,12 @@
#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>