drisw: Fix build on Android Nougat, which lacks shm (v2)
authorChad Versace <chadversary@chromium.org>
Thu, 19 Jul 2018 00:43:35 +0000 (17:43 -0700)
committerChad Versace <chadversary@chromium.org>
Mon, 6 Aug 2018 18:09:38 +0000 (11:09 -0700)
commitaaa41cd297f91583f0e5bddb11b736c0d03e333d
treef881a9d3c5b8c8c3b13394c18f3a50bc7b74985f
parent6229ee87c76a6bb4e2b4003ccbb01b5e4b9c9f65
drisw: Fix build on Android Nougat, which lacks shm (v2)

In commit cf54bd5e8, dri_sw_winsys.c began using <sys/shm.h> to support
the new functions putImageShm, getImageShm in DRI_SWRastLoader. But
Android began supporting System V shared memory only in Oreo. Nougat has
no shm headers.

Fix the build by ifdef'ing out the shm code on Nougat.

Fixes: cf54bd5e8 "drisw: use shared memory when possible"
Reviewed-by: Dave Airlie <airlied@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@gmail.com>
src/gallium/winsys/sw/dri/dri_sw_winsys.c