diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2022-06-16 00:21:28 +0000 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-01-11 22:33:40 +0000 |
commit | bce3acb13566194d2bcb2d183da334c3da9f3160 (patch) | |
tree | 0b938f51a47772b7a64fb1403176fc137410a3eb /include | |
parent | fb1c5d547eb197350244db6b1843cc019ed3346d (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/drm-uapi/dma-buf.h | 18 |
1 files changed, 18 insertions, 0 deletions
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 <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. * |