fix ctime_r problem on Solaris (I hope)
authorSimon Marlow <simonmar@microsoft.com>
Tue, 2 May 2006 11:12:31 +0000 (11:12 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 2 May 2006 11:12:31 +0000 (11:12 +0000)
rts/RtsUtils.c

index 3e7e225..444c839 100644 (file)
 #include "Ticky.h"
 
 #ifdef HAVE_TIME_H
 #include "Ticky.h"
 
 #ifdef HAVE_TIME_H
+#ifdef solaris2_HOST_OS
+// Solaris requires this to get access to the POSIX ctime_r()
+#define _POSIX_PTHREAD_SEMANTICS
+#endif
 #include <time.h>
 #include <time.h>
+#ifdef solaris2_HOST_OS
+#undef _POSIX_PTHREAD_SEMANTICS
+#endif
 #endif
 
 #ifdef HAVE_FCNTL_H
 #endif
 
 #ifdef HAVE_FCNTL_H