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

Natanael Copa ncopa at alpinelinux.org
Thu Nov 22 12:28:08 UTC 2012

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 at 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"

More information about the libvir-list mailing list