[PATCH:xf86-video-modesetting] Include <alloca.h> on platforms that need it for alloca

Alan Coopersmith alan.coopersmith at oracle.com
Fri Apr 6 21:33:54 PDT 2012


Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 configure.ac |    1 +
 src/driver.c |    3 +++
 2 files changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index aa4ae9f..ddec78e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,7 @@ AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
 
 # Checks for header files.
 AC_HEADER_STDC
+AC_ALLOCA
 
 PKG_CHECK_MODULES(DRM, [libdrm >= 2.2])
 PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.10])
diff --git a/src/driver.c b/src/driver.c
index 87431ff..514c423 100644
--- a/src/driver.c
+++ b/src/driver.c
@@ -33,6 +33,9 @@
 #include "config.h"
 #endif
 
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#endif
 #include <unistd.h>
 #include <fcntl.h>
 #include "xf86.h"
-- 
1.7.9.2



More information about the xorg-devel mailing list