From 8f2e09251ecea3c95eb21ae73a282447ad700776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Tigeot?= Date: Wed, 12 Dec 2018 20:48:36 +0100 Subject: [PATCH] libdrm: Use DRM_IOCTL_GET_PCIINFO on DragonFly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is a cleaner and less fragile way to get PCI IDs than the one currently used by local DPorts patches. Signed-off-by: François Tigeot --- xf86drm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xf86drm.c b/xf86drm.c index 1016a2b5..c4a2b424 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -101,7 +101,7 @@ #define DRM_MAJOR 226 /* Linux */ #endif -#ifdef __OpenBSD__ +#if defined(__OpenBSD__) || defined(__DragonFly__) struct drm_pciinfo { uint16_t domain; uint8_t bus; @@ -3063,7 +3063,7 @@ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info) info->func = func; return 0; -#elif defined(__OpenBSD__) +#elif defined(__OpenBSD__) || defined(__DragonFly__) struct drm_pciinfo pinfo; int fd, type; @@ -3229,7 +3229,7 @@ static int drmParsePciDeviceInfo(int maj, int min, return parse_config_sysfs_file(maj, min, device); return 0; -#elif defined(__OpenBSD__) +#elif defined(__OpenBSD__) || defined(__DragonFly__) struct drm_pciinfo pinfo; int fd, type;