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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
This commit is contained in:
duncan.hopkins 2023-10-27 11:28:10 +01:00 committed by Marge Bot
parent 8ad4862126
commit fcd0b4c94a

View file

@ -32,6 +32,7 @@
#else
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/types.h>
@ -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;