From 4bb3f0cffee1f992b74ebc755a890cafb01fe111 Mon Sep 17 00:00:00 2001 From: Nuno Sa Date: Tue, 28 Nov 2023 16:39:29 +0100 Subject: [PATCH] xml_utils: explicitly include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Building osc in arch linux started to fail because of warnings being treated as errors: " error: implicit declaration of function ‘calloc’ [-Werror=implicit-function-declaration] 188 | text = (char *)calloc(1, sizeof(char)); /* Create an empty string */ | ^~~~~~ note: include ‘’ or provide a declaration of ‘calloc’ error: incompatible implicit declaration of built-in function ‘calloc’ [-Werror=builtin-declaration-mismatch] " The likely reason is that stdlib.h was somehow being indirectly included and maybe a change in libxml changed that. Hence, let's just explicitly include the needed header. Signed-off-by: Nuno Sa --- xml_utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xml_utils.c b/xml_utils.c index 270eabbbf..ab0726ecf 100644 --- a/xml_utils.c +++ b/xml_utils.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include