From: Mosè Giordano Date: Sun, 6 Feb 2022 15:41:33 +0000 (+0000) Subject: gdkjpeg: include `stdlib.h` necessary for `free` X-Git-Tag: archive/raspbian/4.6.5+ds-1+rpi1~1^2~19^2~4^2~24^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4c211f1872eb6b1cd937bd98dc86b571fc87f304;p=gtk4.git gdkjpeg: include `stdlib.h` necessary for `free` `free` is defined in `stdlib.h`, see for example . Without this include compilation can fail with the following error: ``` ../gdk/loaders/gdkjpeg.c: In function ‘gdk_save_jpeg’: ../gdk/loaders/gdkjpeg.c:264:7: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration] free (data); ^ ../gdk/loaders/gdkjpeg.c:264:7: warning: incompatible implicit declaration of built-in function ‘free’ ../gdk/loaders/gdkjpeg.c:264:7: note: include ‘’ or provide a declaration of ‘free’ ../gdk/loaders/gdkjpeg.c:302:67: error: ‘free’ undeclared (first use in this function) return g_bytes_new_with_free_func (data, size, (GDestroyNotify) free, NULL); ^ ../gdk/loaders/gdkjpeg.c:302:67: note: each undeclared identifier is reported only once for each function it appears in ../gdk/loaders/gdkjpeg.c:303:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ ``` --- diff --git a/gdk/loaders/gdkjpeg.c b/gdk/loaders/gdkjpeg.c index 8cbb0438a4..8f7e422f0c 100644 --- a/gdk/loaders/gdkjpeg.c +++ b/gdk/loaders/gdkjpeg.c @@ -15,6 +15,8 @@ * License along with this library. If not, see . */ +#include + #include "config.h" #include "gdkjpegprivate.h"