From 94ecdcb8b11dd3eb6b047ad72030d775014aadee Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 6 Sep 2015 09:34:31 -0700 Subject: [PATCH] Include when needed before calling alloca MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes "error: implicit declaration of function 'alloca'" failures when building on Solaris Signed-off-by: Alan Coopersmith Reviewed-by: Marek Olšák --- amdgpu/amdgpu_cs.c | 3 +++ tests/amdgpu/basic_tests.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c index c7910ada..4da98214 100644 --- a/amdgpu/amdgpu_cs.c +++ b/amdgpu/amdgpu_cs.c @@ -32,6 +32,9 @@ #include #include #include +#ifdef HAVE_ALLOCA_H +# include +#endif #include "xf86drm.h" #include "amdgpu_drm.h" diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c index 78740393..e489e6e8 100644 --- a/tests/amdgpu/basic_tests.c +++ b/tests/amdgpu/basic_tests.c @@ -28,6 +28,9 @@ #include #include #include +#ifdef HAVE_ALLOCA_H +# include +#endif #include "CUnit/Basic.h" -- 2.11.0