backends/drm: Fix build with older kernels

DMA_BUF_IOCTL_EXPORT_SYNC_FILE was only included some time ago in the
kernel.

Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
This commit is contained in:
Aleix Pol Gonzalez 2023-12-06 13:34:08 +01:00
parent 25f4732764
commit 62b379ea55

View file

@ -47,7 +47,7 @@ DrmFramebuffer::DrmFramebuffer(DrmGpu *gpu, uint32_t fbId, GraphicsBuffer *buffe
// See https://gitlab.freedesktop.org/drm/intel/-/issues/9415
m_readable = true;
} else {
#ifdef Q_OS_LINUX
#if defined(Q_OS_LINUX) && defined(DMA_BUF_IOCTL_EXPORT_SYNC_FILE)
dma_buf_export_sync_file req{
.flags = DMA_BUF_SYNC_READ,
.fd = -1,