From ec49f5d24a7f40ca4bcb84eb674c12cd201f6683 Mon Sep 17 00:00:00 2001 From: Oleh Nykyforchyn Date: Wed, 17 Dec 2025 22:55:11 +0200 Subject: [PATCH] xfree86/common: hide a variable behind XSERVER_LIBPCIACESS A variable pci_other is declared and can be used only on libpciacceess builds. Fixes: https://github.com/X11Libre/xserver/issues/1713 Signed-off-by: Oleh Nykyforchyn --- hw/xfree86/common/xf86Bus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index 883d668006..1389432984 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -821,10 +821,12 @@ xf86CheckSlot(const void *ptr, BusType type) if (!strcasecmp(pent->driver->driverName, "modesetting")) { /* Examine the first device only */ msOther = xf86FindOptionValue(pent->devices[0]->options, "kmsdev"); - if ((msOther == NULL) && (pci_other == NULL)) { + if (msOther == NULL) +#ifdef XSERVER_LIBPCIACCESS + if (pci_other == NULL) +#endif /* Autoconfigured */ msOther = "/dev/dri/card0"; - } } }