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 <alan.coopersmith@oracle.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>main
parent
8983fe5497
commit
94ecdcb8b1
|
@ -32,6 +32,9 @@
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
#ifdef HAVE_ALLOCA_H
|
||||||
|
# include <alloca.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "xf86drm.h"
|
#include "xf86drm.h"
|
||||||
#include "amdgpu_drm.h"
|
#include "amdgpu_drm.h"
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#ifdef HAVE_ALLOCA_H
|
||||||
|
# include <alloca.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "CUnit/Basic.h"
|
#include "CUnit/Basic.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue