diff options
author | Eric Engestrom <[email protected]> | 2018-11-23 17:04:25 +0000 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2019-06-21 11:35:39 +0000 |
commit | 6a9dd62882b9e2b57394a192cc66e886128df026 (patch) | |
tree | 26cd400d6690085a87adc0c14e25d4fb9bd85230 /src/gallium/winsys | |
parent | 1cbe2ad39442a48b96fff40a3a30c74ac5e4e4e6 (diff) |
drisw: move build logic to build systems
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/sw/dri/dri_sw_winsys.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/winsys/sw/dri/dri_sw_winsys.c b/src/gallium/winsys/sw/dri/dri_sw_winsys.c index 3273813bf50..eacee295ee1 100644 --- a/src/gallium/winsys/sw/dri/dri_sw_winsys.c +++ b/src/gallium/winsys/sw/dri/dri_sw_winsys.c @@ -26,9 +26,7 @@ * **************************************************************************/ -#if !defined(ANDROID) || ANDROID_API_LEVEL >= 26 -/* Android's libc began supporting shm in Oreo */ -#define HAVE_SHM +#ifdef HAVE_SYS_SHM_H #include <sys/ipc.h> #include <sys/shm.h> #endif @@ -88,7 +86,7 @@ dri_sw_is_displaytarget_format_supported( struct sw_winsys *ws, return TRUE; } -#ifdef HAVE_SHM +#ifdef HAVE_SYS_SHM_H static char * alloc_shm(struct dri_sw_displaytarget *dri_sw_dt, unsigned size) { @@ -139,7 +137,7 @@ dri_sw_displaytarget_create(struct sw_winsys *winsys, dri_sw_dt->shmid = -1; -#ifdef HAVE_SHM +#ifdef HAVE_SYS_SHM_H if (ws->lf->put_image_shm) dri_sw_dt->data = alloc_shm(dri_sw_dt, size); #endif @@ -166,7 +164,7 @@ dri_sw_displaytarget_destroy(struct sw_winsys *ws, struct dri_sw_displaytarget *dri_sw_dt = dri_sw_displaytarget(dt); if (dri_sw_dt->shmid >= 0) { -#ifdef HAVE_SHM +#ifdef HAVE_SYS_SHM_H shmdt(dri_sw_dt->data); shmctl(dri_sw_dt->shmid, IPC_RMID, 0); #endif |