[vlc-commits] configure.ac: properly detect vasprintf

Natanael Copa git at videolan.org
Thu Mar 22 18:03:37 CET 2012


vlc/vlc-2.0 | branch: master | Natanael Copa <ncopa at alpinelinux.org> | Thu Mar 22 09:00:08 2012 +0000| [22db9f28b4c7a7fb1b0dde420854e5b1a0278b1e] | committer: Jean-Baptiste Kempf

configure.ac: properly detect vasprintf

According POSIX the va_list is defined in stdarg.h
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/stdarg.h.html

On some systems (like uClibc) the detection of vasprintf will fail
unless stdarg.h is included and build will later fail due to a vasprintf
redeclaration.

Signed-off-by: Natanael Copa <ncopa at alpinelinux.org>
Signed-off-by: Rafaël Carré <funman at videolan.org>
(cherry picked from commit 2859c5db3a74c5155e1715614570e9cb38d0ef82)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=22db9f28b4c7a7fb1b0dde420854e5b1a0278b1e
---

 configure.ac |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3bf0f0e..b78b960 100644
--- a/configure.ac
+++ b/configure.ac
@@ -529,7 +529,8 @@ AC_LINK_IFELSE([
             c = NULL;
     ])],[AC_DEFINE([HAVE_ASPRINTF],[1],[Define to 1 if you have asprintf function])],[AC_LIBOBJ([asprintf])])
 AC_LINK_IFELSE([
-    AC_LANG_PROGRAM([#include <stdio.h>], [
+    AC_LANG_PROGRAM([#include <stdio.h>
+                     #include <stdarg.h>], [
         char *c;
         va_list ap;
         if (vasprintf(&c, "%s %d", ap) == -1)



More information about the vlc-commits mailing list