1
0

200-uclibc-ceill.patch 529 B

123456789101112131415161718192021222324
  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. #define BMP_DEBUG(s)
  13. +#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LONG_DOUBLE_MATH__)
  14. +long double ceill(long double x)
  15. +{
  16. + return (long double)ceil((double)x);
  17. +}
  18. +#endif
  19. +
  20. static int gdBMPPutWord(gdIOCtx *out, int w)
  21. {
  22. /* Byte order is little-endian */