Message ID | 1441557505-24293-1-git-send-email-alan.coopersmith@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Marek On Sun, Sep 6, 2015 at 6:38 PM, Alan Coopersmith <alan.coopersmith@oracle.com> wrote: > Fixes "error: implicit declaration of function 'alloca'" failures > when building on Solaris > > Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> > --- > 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 c7910ad..4da9821 100644 > --- a/amdgpu/amdgpu_cs.c > +++ b/amdgpu/amdgpu_cs.c > @@ -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" > 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 <stdio.h> > #include <stdlib.h> > #include <unistd.h> > +#ifdef HAVE_ALLOCA_H > +# include <alloca.h> > +#endif > > #include "CUnit/Basic.h" > > -- > 1.7.9.2 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel
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 <pthread.h> #include <sched.h> #include <sys/ioctl.h> +#ifdef HAVE_ALLOCA_H +# include <alloca.h> +#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 <stdio.h> #include <stdlib.h> #include <unistd.h> +#ifdef HAVE_ALLOCA_H +# include <alloca.h> +#endif #include "CUnit/Basic.h"
Fixes "error: implicit declaration of function 'alloca'" failures when building on Solaris Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> --- amdgpu/amdgpu_cs.c | 3 +++ tests/amdgpu/basic_tests.c | 3 +++ 2 files changed, 6 insertions(+)