[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] build: trivial fix error: implicit declaration of function 'malloc'



Fixes this error when building with -Werror on Alpine Linux:

util/processinfo.c: In function 'virProcessInfoSetAffinity':
util/processinfo.c:52:5: error: implicit declaration of function 'malloc' [-Werror=implicit-function-declaration]

Signed-off-by: Natanael Copa <ncopa alpinelinux org>
---
 src/util/processinfo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/processinfo.c b/src/util/processinfo.c
index c3648d4..b8c60eb 100644
--- a/src/util/processinfo.c
+++ b/src/util/processinfo.c
@@ -21,6 +21,7 @@
 
 #include <config.h>
 
+#include <stdlib.h>
 #include <sched.h>
 
 #include "processinfo.h"
-- 
1.8.0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]