From: Alan Coopersmith Date: Sun, 6 Sep 2015 16:34:31 +0000 (-0700) Subject: Include when needed before calling alloca X-Git-Tag: libdrm-2.4.65~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94ecdcb8b11dd3eb6b047ad72030d775014aadee;p=platform%2Fupstream%2Flibdrm.git Include when needed before calling alloca Fixes "error: implicit declaration of function 'alloca'" failures when building on Solaris Signed-off-by: Alan Coopersmith Reviewed-by: Marek Olšák --- diff --git a/amdgpu/amdgpu_cs.c b/amdgpu/amdgpu_cs.c index c7910ad..4da9821 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 7874039..e489e6e 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"