summaryrefslogtreecommitdiff
path: root/graphics/libcaca/files/patch-src_common-image.c
blob: df6ecefdd9f62eaced08f268904df5a90ec02a40 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Fix build when the IMLIB2 option is disabled. The _caca_alloc2d symbol
is not exported.

https://github.com/cacalabs/libcaca/issues/59

--- src/common-image.c.orig	2021-10-19 13:49:20 UTC
+++ src/common-image.c
@@ -161,7 +161,7 @@ struct image * load_image(char const * name)
     uint32_t depth = (bpp + 7) / 8;
 
     /* Allocate the pixel buffer */
-    im->pixels = _caca_alloc2d(im->w, im->h, depth);
+    im->pixels = malloc(im->w * im->h * depth);
     if (!im->pixels)
     {
         caca_file_close(f);