summaryrefslogtreecommitdiff
path: root/rts/RtsUtils.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/RtsUtils.c')
-rw-r--r--rts/RtsUtils.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rts/RtsUtils.c b/rts/RtsUtils.c
index c730d7aec4..0123531e27 100644
--- a/rts/RtsUtils.c
+++ b/rts/RtsUtils.c
@@ -18,6 +18,13 @@
#include <time.h>
#endif
+/* HACK: On Mac OS X 10.4 (at least), time.h doesn't declare ctime_r with
+ * _POSIX_C_SOURCE. If this is the case, we declare it ourselves.
+ */
+#if HAVE_CTIME_R && !HAVE_DECL_CTIME_R
+extern char *ctime_r(const time_t *, char *);
+#endif
+
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif