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 <oleh.nyk@gmail.com>
This commit is contained in:
Oleh Nykyforchyn
2025-12-17 22:55:11 +02:00
committed by Enrico Weigelt
parent ccb9b1bd17
commit ec49f5d24a

View File

@@ -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";
}
}
}