git » libfiu » commit 005a56f

libfiu: Include <stdlib.h> to fix a broken build

author Alberto Bertogli
2012-04-06 16:51:15 UTC
committer Alberto Bertogli
2012-04-06 16:51:15 UTC
parent 6f1eeacdabb857e06b78deeb2c38fc452b783ad6

libfiu: Include <stdlib.h> to fix a broken build

On some platforms, the headers already included by backtrace.c are not enough
to get the definition of NULL, so this patch includes <stdlib.h> directly to
prevent that.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

libfiu/backtrace.c +1 -0

diff --git a/libfiu/backtrace.c b/libfiu/backtrace.c
index fc44d9a..60c2e27 100644
--- a/libfiu/backtrace.c
+++ b/libfiu/backtrace.c
@@ -7,6 +7,7 @@
 /* This is needed for some of the functions below. */
 #define _GNU_SOURCE
 
+#include <stdlib.h>	/* NULL */
 #include <execinfo.h>
 #include <dlfcn.h>
 #include <sys/procfs.h>