From fcd0b4c94aa750711c9f88585a07660ef16aaecc Mon Sep 17 00:00:00 2001 From: "duncan.hopkins" Date: Fri, 27 Oct 2023 11:28:10 +0100 Subject: [PATCH] util: Updated util/libdrm.h stubs with drmGetMagic() Update adds in missing items that MacOS code needs to compile and run the DRI2 code. New code is copied from the public repository: https://gitlab.freedesktop.org/mesa/drm/-/blob/main/xf86drm.h Part-of: --- src/util/libdrm.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/util/libdrm.h b/src/util/libdrm.h index 3ba9c396300..4bfe1d20166 100644 --- a/src/util/libdrm.h +++ b/src/util/libdrm.h @@ -32,6 +32,7 @@ #else #include +#include #include #include @@ -45,6 +46,14 @@ #define DRM_BUS_PLATFORM 2 #define DRM_BUS_HOST1X 3 +typedef unsigned int drm_magic_t; + +static int +drmGetMagic(int fd, drm_magic_t * magic) +{ + return -EINVAL; +} + typedef struct _drmPciDeviceInfo { uint16_t vendor_id; uint16_t device_id;