asprintf is a GNU extension and one needs to define _GNU_SOURCE before including stdio.h. Otherwise, the build breaks this way with CFLAGS="-Wall -Werror": | CC process.lo | cc1: warnings being treated as errors | process.c: In function ‘ProcessError’: | process.c:672: error: implicit declaration of function ‘asprintf’ | process.c:672: error: nested extern declaration of ‘asprintf’ | make[2]: *** [process.lo] Error 1
Signed-off-by: Cyril Brulebois <[email protected]> --- src/process.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/process.c b/src/process.c index 58c6894..bdeeb7f 100644 --- a/src/process.c +++ b/src/process.c @@ -29,6 +29,12 @@ Author: Ralph Mor, X Consortium #ifdef HAVE_CONFIG_H #include <config.h> #endif + +#ifdef HAVE_ASPRINTF +#define _GNU_SOURCE +#include <stdio.h> +#endif + #include <X11/ICE/ICElib.h> #include "ICElibint.h" -- 1.7.2.3 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
