summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Schleifer <js@heap.zone>2018-05-26 17:22:02 +0200
committerJonathan Schleifer <js@heap.zone>2018-05-26 17:22:02 +0200
commit24818e41a38a209137032c99217b9cfd749ac222 (patch)
treee41e5f454577c0017710734fc94868594a8f440b
parent1d72fa52fab1a68fcdc686b8c35e5e3c689dccdf (diff)
Work around amiga-gcc not having trunc()
-rw-r--r--src/OFDate.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/OFDate.m b/src/OFDate.m
index 24850a17..d8432717 100644
--- a/src/OFDate.m
+++ b/src/OFDate.m
@@ -41,6 +41,11 @@
#import "of_strptime.h"
+#ifdef OF_AMIGAOS_M68K
+/* amiga-gcc does not have trunc() */
+# define trunc(x) ((int64_t)(x))
+#endif
+
#if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \
defined(OF_HAVE_THREADS)
static OFMutex *mutex;