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