summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLior Kaplan <kaplanlior@gmail.com>2017-11-29 13:45:21 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2017-11-29 16:46:47 +0100
commit32e3d7b99e5f37d54d47bb385ef8d57c049b030a (patch)
tree9f51370de0517ffea12123d1c0140ba48c3a8b7f
parent26656684eacfaf386fcecc461ab49b9b6086c635 (diff)
downloadphp-git-32e3d7b99e5f37d54d47bb385ef8d57c049b030a.tar.gz
Define floorf if system doesn't have it (follow up for 22c48761)
floorf is checked in config.m4
-rw-r--r--ext/gd/libgd/gd_interpolation.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/gd/libgd/gd_interpolation.c b/ext/gd/libgd/gd_interpolation.c
index 07eefd6488..2a2479c912 100644
--- a/ext/gd/libgd/gd_interpolation.c
+++ b/ext/gd/libgd/gd_interpolation.c
@@ -66,6 +66,16 @@ TODO:
# include <emmintrin.h>
#endif
+#ifndef HAVE_FLOORF
+# define HAVE_FLOORF 0
+#endif
+#if HAVE_FLOORF == 0
+# ifndef floorf
+/* float floorf(float x);*/
+# define floorf(x) ((float)(floor(x)))
+# endif
+#endif
+
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif