From bce3acb13566194d2bcb2d183da334c3da9f3160 Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Thu, 16 Jun 2022 00:21:28 +0000 Subject: drm-uapi/dma-buf.h: unbreak on non-Linux via local typedefs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 ^~~~~~~~~~~~~~~ Reviewed-by: Jason Ekstrand Acked-by: Daniel Stone Reviewed-by: José Roberto de Souza Part-of: --- include/drm-uapi/dma-buf.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'include') diff --git a/include/drm-uapi/dma-buf.h b/include/drm-uapi/dma-buf.h index 30fb8834aa3..60ca66f8329 100644 --- a/include/drm-uapi/dma-buf.h +++ b/include/drm-uapi/dma-buf.h @@ -20,8 +20,26 @@ #ifndef _DMA_BUF_UAPI_H_ #define _DMA_BUF_UAPI_H_ +#if defined(__linux__) + #include +#else /* One of the BSDs */ + +#include +#include + +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. * -- cgit v1.2.1