From 4c211f1872eb6b1cd937bd98dc86b571fc87f304 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mos=C3=A8=20Giordano?= Date: Sun, 6 Feb 2022 15:41:33 +0000 Subject: [PATCH] gdkjpeg: include `stdlib.h` necessary for `free` MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit `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] } ^ ``` --- gdk/loaders/gdkjpeg.c | 2 ++ 1 file changed, 2 insertions(+) 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" -- 2.30.2