aboutsummaryrefslogtreecommitdiffhomepage
path: root/compat
diff options
context:
space:
mode:
Diffstat (limited to 'compat')
-rw-r--r--compat/check_asctime.c11
-rw-r--r--compat/compat.h3
2 files changed, 14 insertions, 0 deletions
diff --git a/compat/check_asctime.c b/compat/check_asctime.c
new file mode 100644
index 00000000..b0e56f0c
--- /dev/null
+++ b/compat/check_asctime.c
@@ -0,0 +1,11 @@
+#include <time.h>
+#include <stdio.h>
+
+int main()
+{
+ struct tm tm;
+
+ (void) asctime_r (&tm, NULL);
+
+ return (0);
+}
diff --git a/compat/compat.h b/compat/compat.h
index c1ee0f93..0c4ac66f 100644
--- a/compat/compat.h
+++ b/compat/compat.h
@@ -33,6 +33,9 @@ extern "C" {
#if !STD_GETPWUID
#define _POSIX_PTHREAD_SEMANTICS 1
#endif
+#if !STD_ASCTIME
+#define _POSIX_PTHREAD_SEMANTICS 1
+#endif
#if !HAVE_GETLINE
#include <stdio.h>