Files
xserver/hw/xfree86/common/xf86_pci_priv.h
Mario Limonciello a86be24e6e Add compatibility define for pci_device_is_boot_display()
It will take some time for a new libpciaccess to be released and
even then bumping the dependency for libpciaccess isn't attractive.
If an older libpciaccess is used just add a static inline define.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2038>
2026-03-23 12:46:15 +01:00

29 lines
728 B
C

/* SPDX-License-Identifier: MIT OR X11
*
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*/
#ifndef _XSERVER_XF86_PCI_PRIV_H
#define _XSERVER_XF86_PCI_PRIV_H
#ifdef XSERVER_LIBPCIACCESS
#include <pciaccess.h>
#else
struct pci_device;
#endif
/*
* placeholder for a new libpciaccess function in upcoming releases:
* https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/merge_requests/39/
*
* callee code is already prepared for using it, but for the time being
* we need a dummy - until the actual one is really there.
*/
#ifndef HAVE_PCI_DEVICE_IS_BOOT_DISPLAY
static inline int pci_device_is_boot_display(struct pci_device *dev)
{
return 0;
}
#endif
#endif /* _XSERVER_XF86_PCI_PRIV_H */