packages/libs/libgd/patches/200-uclibc-ceill.patch
Daniel Engberg b37475417f libs/libgd: Update to 2.2.4
Update libgd to 2.2.4
Fixes multiple CVEs
Refresh patches
Update list according to:
https://svnweb.freebsd.org/ports/head/graphics/gd/pkg-plist?revision=432648&view=markup
...except helpers as it's not generated.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
2017-04-17 20:39:01 +02:00

24 lines
529 B
Diff

--- 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 */