From a051baf1a921905e318b47c4489a0a78b8cf873f Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 24 Jul 2020 15:32:16 +0200 Subject: [PATCH] screencasting: still build if memfd isn't available BUG: 424607 --- screencast/pipewirestream.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/screencast/pipewirestream.cpp b/screencast/pipewirestream.cpp index e7e67dc805..87bfaa2ed6 100644 --- a/screencast/pipewirestream.cpp +++ b/screencast/pipewirestream.cpp @@ -130,6 +130,7 @@ void PipeWireStream::onStreamAddBuffer(void *data, pw_buffer *buffer) spa_data->maxsize = dmabuf->stride() * stream->m_resolution.height(); stream->m_dmabufDataForPwBuffer.insert(buffer, dmabuf); +#ifdef F_SEAL_SEAL //Disable memfd on systems that don't have it, like BSD < 12 } else { const int bytesPerPixel = stream->m_hasAlpha ? 4 : 3; const int stride = SPA_ROUND_UP_N (stream->m_resolution.width() * bytesPerPixel, 4); @@ -161,6 +162,7 @@ void PipeWireStream::onStreamAddBuffer(void *data, pw_buffer *buffer) qCCritical(KWIN_PIPEWIRE) << "memfd: Failed to mmap memory"; else qCDebug(KWIN_PIPEWIRE) << "memfd: created successfully" << spa_data->data << spa_data->maxsize; +#endif } }