summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-12-16 15:03:58 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2010-01-16 19:37:05 -0800
commitfe7b93fb493b76ade13ad74438acbc4d34d2f3bd (patch)
tree843cf0baea972e404329637a28192dbb2a880ed2
parent3d3d87f3a70089f645facb2bff5a0b93ec0a0efd (diff)
Include alloca.h in tests/drmstat.c when configure detects it
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-rw-r--r--configure.ac1
-rw-r--r--tests/drmstat.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d3dc1542..b257ccf6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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)
diff --git a/tests/drmstat.c b/tests/drmstat.c
index ed2aeb61..e2e75234 100644
--- a/tests/drmstat.c
+++ b/tests/drmstat.c
@@ -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;