Skip to content

Commit d7f54af

Browse files
committed
Try to fix Android build by defining DMA_BUF_IOCTL_EXPORT_SYNC_FILE
1 parent 198494b commit d7f54af

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/kernel_supplement.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#endif
99

1010
#include <linux/capability.h>
11+
#include <linux/dma-buf.h>
1112
#include <linux/if_tun.h>
1213
#include <linux/mman.h>
1314
#include <linux/seccomp.h>
@@ -562,6 +563,10 @@ enum {
562563
#define ARCH_REQ_XCOMP_PERM 0x1023
563564
#endif
564565

566+
#ifndef DMA_BUF_IOCTL_EXPORT_SYNC_FILE
567+
#define DMA_BUF_IOCTL_EXPORT_SYNC_FILE _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file)
568+
#endif
569+
565570
} // namespace rr
566571

567572
// We can't include libc's ptrace.h, so declare this here.

src/test/v4l_dmabuf.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
#include <linux/dma-buf.h>
66

7+
#ifndef DMA_BUF_IOCTL_EXPORT_SYNC_FILE
8+
#define DMA_BUF_IOCTL_EXPORT_SYNC_FILE _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file)
9+
#endif
10+
711
static const char device_name[] = "/dev/video0";
812

913
static void no_v4l2(void) {

0 commit comments

Comments
 (0)