Even after copying the missing header to /usr/include/linux/ on my system, I’m getting build failures:
../../ui/gfx/linux/client_native_pixmap_dmabuf.cc: In function ‘void gfx::{anonymous}::PrimeSyncStart(int)’:
../../ui/gfx/linux/client_native_pixmap_dmabuf.cc:47:29: error: variable ‘gfx::{anonymous}::PrimeSyncStart(int)::local_dma_buf_sync sync_start’ has initializer but incomplete type
struct local_dma_buf_sync sync_start = {0}; ^~~~~~~~~~
../../ui/gfx/linux/client_native_pixmap_dmabuf.cc:49:22: error: ‘LOCAL_DMA_BUF_SYNC_START’ was not declared in this scope
sync_start.flags = LOCAL_DMA_BUF_SYNC_START | LOCAL_DMA_BUF_SYNC_RW; ^~~~~~~~~~~~~~~~~~~~~~~~
It appears LOCAL_DMA_BUF_SYNC_* are not defined in that header.
I’m temporarily working around the issue with the following patch to chromium:
Even after copying the missing header to /usr/include/linux/ on my system, I’m getting build failures:
../../ui/ gfx/linux/ client_ native_ pixmap_ dmabuf. cc: In function ‘void gfx::{anonymous }::PrimeSyncSta rt(int) ’: gfx/linux/ client_ native_ pixmap_ dmabuf. cc:47:29: error: variable ‘gfx::{ anonymous} ::PrimeSyncStar t(int): :local_ dma_buf_ sync sync_start’ has initializer but incomplete type
^~~~~~ ~~~~ gfx/linux/ client_ native_ pixmap_ dmabuf. cc:49:22: error: ‘LOCAL_ DMA_BUF_ SYNC_START’ was not declared in this scope BUF_SYNC_ START | LOCAL_DMA_ BUF_SYNC_ RW;
^~~~~~ ~~~~~~~ ~~~~~~~ ~~~~
../../ui/
struct local_dma_buf_sync sync_start = {0};
../../ui/
sync_start.flags = LOCAL_DMA_
It appears LOCAL_DMA_ BUF_SYNC_ * are not defined in that header.
I’m temporarily working around the issue with the following patch to chromium:
diff --git a/ui/gfx/ linux/client_ native_ pixmap_ dmabuf. cc b/ui/gfx/ linux/client_ native_ pixmap_ dmabuf. cc .57de7fa683a0 100644 linux/client_ native_ pixmap_ dmabuf. cc linux/client_ native_ pixmap_ dmabuf. cc stringprintf. h" event/trace_ event.h"
index d656c338f0a6.
--- a/ui/gfx/
+++ b/ui/gfx/
@@ -17,7 +17,7 @@
#include "base/strings/
#include "base/trace_
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
#include <linux/types.h>
struct local_dma_buf_sync {