200-uclibc-ceill.patch (529B)
1 --- a/src/gd_bmp.c 2 +++ b/src/gd_bmp.c 3 @@ -21,6 +21,7 @@ 4 #include <math.h> 5 #include <string.h> 6 #include <stdlib.h> 7 +#include <features.h> 8 #include "gd.h" 9 #include "gdhelpers.h" 10 #include "bmp.h" 11 @@ -42,6 +43,13 @@ static int bmp_read_rle(gdImagePtr im, g 12 13 #define BMP_DEBUG(s) 14 15 +#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LONG_DOUBLE_MATH__) 16 +long double ceill(long double x) 17 +{ 18 + return (long double)ceil((double)x); 19 +} 20 +#endif 21 + 22 static int gdBMPPutWord(gdIOCtx *out, int w) 23 { 24 /* Byte order is little-endian */