From 32e3d7b99e5f37d54d47bb385ef8d57c049b030a Mon Sep 17 00:00:00 2001 From: Lior Kaplan Date: Wed, 29 Nov 2017 13:45:21 +0200 Subject: [PATCH] Define floorf if system doesn't have it (follow up for 22c48761) floorf is checked in config.m4 --- ext/gd/libgd/gd_interpolation.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 #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 -- 2.40.0