mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-05 04:06:11 -05:00
render: drop <linux/dma-buf.h> compat defines
It's been 3 years, so these defines are widespread enough by now.
This commit is contained in:
parent
3f9a164484
commit
caed9d78d7
2 changed files with 5 additions and 25 deletions
|
|
@ -50,30 +50,6 @@ bool dmabuf_check_sync_file_import_export(void) {
|
|||
return KERNEL_VERSION(major, minor, patch) >= KERNEL_VERSION(5, 20, 0);
|
||||
}
|
||||
|
||||
// TODO: drop these definitions once widespread
|
||||
|
||||
#if !defined(DMA_BUF_IOCTL_IMPORT_SYNC_FILE)
|
||||
|
||||
struct dma_buf_import_sync_file {
|
||||
__u32 flags;
|
||||
__s32 fd;
|
||||
};
|
||||
|
||||
#define DMA_BUF_IOCTL_IMPORT_SYNC_FILE _IOW(DMA_BUF_BASE, 3, struct dma_buf_import_sync_file)
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(DMA_BUF_IOCTL_EXPORT_SYNC_FILE)
|
||||
|
||||
struct dma_buf_export_sync_file {
|
||||
__u32 flags;
|
||||
__s32 fd;
|
||||
};
|
||||
|
||||
#define DMA_BUF_IOCTL_EXPORT_SYNC_FILE _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file)
|
||||
|
||||
#endif
|
||||
|
||||
bool dmabuf_import_sync_file(int dmabuf_fd, uint32_t flags, int sync_file_fd) {
|
||||
struct dma_buf_import_sync_file data = {
|
||||
.flags = flags,
|
||||
|
|
|
|||
|
|
@ -17,7 +17,11 @@ wlr_files += files(
|
|||
'wlr_texture.c',
|
||||
)
|
||||
|
||||
if cc.has_header('linux/dma-buf.h') and target_machine.system() == 'linux'
|
||||
has_dma_buf_import_sync_file = cc.has_header('linux/dma-buf.h') and cc.has_define(
|
||||
'DMA_BUF_IOCTL_IMPORT_SYNC_FILE',
|
||||
prefix: '#include <linux/dma-buf.h>',
|
||||
)
|
||||
if has_dma_buf_import_sync_file and target_machine.system() == 'linux'
|
||||
wlr_files += files('dmabuf_linux.c')
|
||||
else
|
||||
wlr_files += files('dmabuf_fallback.c')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue