Include <alloca.h> when needed before calling alloca
Fixes "error: implicit declaration of function 'alloca'" failures when building on Solaris
Signed-off-by Alan Coopersmith <[email protected]>
--- amdgpu/amdgpu_cs.c | 3 +++ tests/amdgpu/basic_tests.c | 3 +++ 2 files changed, 6 insertions(+)
amdgpu/amdgpu_cs.c +3 -0
@@ -32,6 +32,9 @@#include <pthread.h> #include <sched.h> #include <sys/ioctl.h> +#ifdef HAVE_ALLOCA_H +# include <alloca.h> +#endif #include "xf86drm.h" #include "amdgpu_drm.h"
tests/amdgpu/basic_tests.c +3 -0
@@ -28,6 +28,9 @@#include <stdio.h> #include <stdlib.h> #include <unistd.h> +#ifdef HAVE_ALLOCA_H +# include <alloca.h> +#endif #include "CUnit/Basic.h"
Signature · 6 lines
1.7.9.2 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Marek Olšák
Reviewed-byReviewed-by Marek Olšák <[email protected]>
Marek
Quoted 40 lines · Alan Coopersmith
Fixes "error: implicit declaration of function 'alloca'" failures when building on Solaris
Signed-off-by Alan Coopersmith <[email protected]>--- amdgpu/amdgpu_cs.c | 3 +++ tests/amdgpu/basic_tests.c | 3 +++ 2 files changed, 6 insertions(+)amdgpu/amdgpu_cs.c +3
-0@@ -32,6 +32,9 @@#include <pthread.h> #include <sched.h> #include <sys/ioctl.h> +#ifdef HAVE_ALLOCA_H +# include <alloca.h> +#endif #include "xf86drm.h" #include "amdgpu_drm.h" tests/amdgpu/basic_tests.c +3
-1@@ -28,6 +28,9 @@#include <stdio.h> #include <stdlib.h> #include <unistd.h> +#ifdef HAVE_ALLOCA_H +# include <alloca.h> +#endif #include "CUnit/Basic.h" --1.7.9.2
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel