summaryrefslogtreecommitdiff
path: root/packages/gnash/files/fix-trunc.diff
blob: a01ca311d009414254d3c380d09aa41f522a7c9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- /tmp/utility.h	2008-09-02 16:35:44.000000000 +0200
+++ gnash/libbase/utility.h	2008-09-02 16:36:10.000000000 +0200
@@ -327,6 +327,10 @@
 #endif
 }
 
+#ifndef HAVE_TRUNC
+inline double trunc(double x) { return (x < 0 ?  -(std::floor(-x)) : std::floor(x)); }
+#endif
+
 #endif // UTILITY_H