]> git.ipfire.org Git - thirdparty/pciutils.git/commitdiff
libpci: Do not call unversioned symbols from libpci itself
authorPali Rohár <pali@kernel.org>
Sun, 8 May 2022 08:52:35 +0000 (10:52 +0200)
committerPali Rohár <pali@kernel.org>
Sun, 30 Oct 2022 15:00:36 +0000 (16:00 +0100)
Windows version of GNU LD has bugs which cause that linker would translate
this unknown unversioned symbols to some random version.

So change pci_fill_info() to pci_fill_info_v38() in lib/filter.c to ensure
that last version of this function would be used also by Windows version of
GNU LD linker.

Before this change GNU LD translated this function call to symbol
_pci_fill_info@LIBPCI_3.0. After this change GNU LD translate it to
_pci_fill_info@LIBPCI_3.8.

lib/filter.c

index b881b6bc90835162014eafae06d7689f5a5f4922..2abb631cfcceaeeda3ac11a19f4365f3eb7dfc00 100644 (file)
@@ -204,13 +204,13 @@ pci_filter_match_v38(struct pci_filter *f, struct pci_dev *d)
     }
   if (f->device_class >= 0)
     {
-      pci_fill_info(d, PCI_FILL_CLASS);
+      pci_fill_info_v38(d, PCI_FILL_CLASS);
       if ((f->device_class ^ d->device_class) & f->device_class_mask)
        return 0;
     }
   if (f->prog_if >= 0)
     {
-      pci_fill_info(d, PCI_FILL_CLASS_EXT);
+      pci_fill_info_v38(d, PCI_FILL_CLASS_EXT);
       if (f->prog_if != d->prog_if)
        return 0;
     }