Include alloca.h in tests/drmstat.c when configure detects it
authorAlan Coopersmith <alan.coopersmith@sun.com>
Wed, 16 Dec 2009 23:03:58 +0000 (15:03 -0800)
committerAlan Coopersmith <alan.coopersmith@sun.com>
Sun, 17 Jan 2010 03:37:05 +0000 (19:37 -0800)
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
configure.ac
tests/drmstat.c

index d3dc154..b257ccf 100644 (file)
@@ -32,6 +32,7 @@ AC_PROG_CC
 
 AC_HEADER_STDC
 AC_SYS_LARGEFILE
+AC_FUNC_ALLOCA
 
 PKG_CHECK_MODULES(PTHREADSTUBS, pthread-stubs)
 AC_SUBST(PTHREADSTUBS_CFLAGS)
index ed2aeb6..e2e7523 100644 (file)
@@ -28,6 +28,8 @@
  * 
  */
 
+#include "config.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -39,6 +41,9 @@
 #include <errno.h>
 #include <signal.h>
 #include <fcntl.h>
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#endif
 #include "xf86drm.h"
 
 int sigio_fd;