drm-uapi/dma-buf.h: unbreak on non-Linux via local typedefs
In file included from src/vulkan/wsi/wsi_common_drm.c:34: include/drm-uapi/dma-buf.h:23:10: fatal error: 'linux/types.h' file not found #include <linux/types.h> ^~~~~~~~~~~~~~~ Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Acked-by: Daniel Stone <daniels@collabora.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16987>
This commit is contained in:
@@ -20,8 +20,26 @@
|
||||
#ifndef _DMA_BUF_UAPI_H_
|
||||
#define _DMA_BUF_UAPI_H_
|
||||
|
||||
#if defined(__linux__)
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#else /* One of the BSDs */
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
typedef int8_t __s8;
|
||||
typedef uint8_t __u8;
|
||||
typedef int16_t __s16;
|
||||
typedef uint16_t __u16;
|
||||
typedef int32_t __s32;
|
||||
typedef uint32_t __u32;
|
||||
typedef int64_t __s64;
|
||||
typedef uint64_t __u64;
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* struct dma_buf_sync - Synchronize with CPU access.
|
||||
*
|
||||
|
Reference in New Issue
Block a user