From: | "Paweł Hajdan |
---|---|
To: | gentoo-dev@l.g.o |
Subject: | [gentoo-dev] linux/dma-buf.h mysteriously missing |
Date: | Wed, 29 Mar 2017 16:34:22 |
Message-Id: | 8ade455f-0287-a30a-8765-5261a9a5f6ae@gentoo.org |
1 | I was packaging chromium-59.0.3053.3 . I worked around the problem |
2 | described here, but I'd like to find the right long term solution. |
3 | |
4 | I was hitting the following compile error: |
5 | |
6 | ../../ui/gfx/linux/client_native_pixmap_dmabuf.cc:39:27: fatal error: |
7 | linux/dma-buf.h: No such file or directory |
8 | #include <linux/dma-buf.h> |
9 | |
10 | Despite having sys-kernel/linux-headers-4.10 installed, I do not have |
11 | that header. Interestingly, it is present in the tarball |
12 | (gentoo-headers-base-4.10.tar.xz), but doesn't seem to get installed. |
13 | |
14 | This is the workaround I applied: |
15 | <https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-dma-buf-r1.patch?id=f3d721fbb4127f17e836a1842cfdd2bf76f0d398> |
16 | |
17 | This is part of the chromium code in question: |
18 | |
19 | <https://cs.chromium.org/chromium/src/ui/gfx/linux/client_native_pixmap_dmabuf.cc?q=dma-buf.h+package:%5Echromium$&l=39&dr=C> |
20 | |
21 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) |
22 | #include <linux/types.h> |
23 | |
24 | struct local_dma_buf_sync { |
25 | __u64 flags; |
26 | }; |
27 | |
28 | #define LOCAL_DMA_BUF_SYNC_READ (1 << 0) |
29 | #define LOCAL_DMA_BUF_SYNC_WRITE (2 << 0) |
30 | #define LOCAL_DMA_BUF_SYNC_RW \ |
31 | (LOCAL_DMA_BUF_SYNC_READ | LOCAL_DMA_BUF_SYNC_WRITE) |
32 | #define LOCAL_DMA_BUF_SYNC_START (0 << 2) |
33 | #define LOCAL_DMA_BUF_SYNC_END (1 << 2) |
34 | |
35 | #define LOCAL_DMA_BUF_BASE 'b' |
36 | #define LOCAL_DMA_BUF_IOCTL_SYNC \ |
37 | _IOW(LOCAL_DMA_BUF_BASE, 0, struct local_dma_buf_sync) |
38 | |
39 | #else |
40 | #include <linux/dma-buf.h> |
41 | #endif |
42 | |
43 | Paweł |
File name | MIME type |
---|---|
signature.asc | application/pgp-signature |
Subject | Author |
---|---|
Re: [gentoo-dev] linux/dma-buf.h mysteriously missing | Mike Gilbert <floppym@g.o> |
Re: [gentoo-dev] linux/dma-buf.h mysteriously missing | Matt Turner <mattst88@g.o> |