]> git.ipfire.org Git - thirdparty/pciutils.git/commitdiff
Better work-around for missing symbol versioning on Darwin
authorMartin Mares <mj@ucw.cz>
Sat, 1 Nov 2014 15:49:42 +0000 (16:49 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 1 Nov 2014 15:49:42 +0000 (16:49 +0100)
lib/access.c
lib/internal.h

index bb5c9ceea1f58e0e5a7429bb00bd361b4fd972e9..c23a2fd159723f62f9febcdb2f6bea26db600672 100644 (file)
@@ -170,13 +170,11 @@ pci_fill_info_v32(struct pci_dev *d, int flags)
 /* In version 3.1, pci_fill_info got new flags => versioned alias */
 /* In version 3.2, the same has happened */
 STATIC_ALIAS(int pci_fill_info(struct pci_dev *d, int flags), pci_fill_info_v32(d, flags));
-#ifndef __APPLE__
 DEFINE_ALIAS(int pci_fill_info_v30(struct pci_dev *d, int flags), pci_fill_info_v32);
 DEFINE_ALIAS(int pci_fill_info_v31(struct pci_dev *d, int flags), pci_fill_info_v32);
 SYMBOL_VERSION(pci_fill_info_v30, pci_fill_info@LIBPCI_3.0);
 SYMBOL_VERSION(pci_fill_info_v31, pci_fill_info@LIBPCI_3.1);
 SYMBOL_VERSION(pci_fill_info_v32, pci_fill_info@@LIBPCI_3.2);
-#endif
 
 void
 pci_setup_cache(struct pci_dev *d, byte *cache, int len)
index 03c02f95ce5d50d0a22f14cfcf8823498debb7d4..de57c5ecb145ff673223a2e4494ae81201dd7763 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     The PCI Library -- Internal Stuff
  *
- *     Copyright (c) 1997--2008 Martin Mares <mj@ucw.cz>
+ *     Copyright (c) 1997--2014 Martin Mares <mj@ucw.cz>
  *
  *     Can be freely distributed and used under the terms of the GNU GPL.
  */
 #ifdef PCI_SHARED_LIB
 #define PCI_ABI __attribute__((visibility("default")))
 #ifdef __APPLE__
-#define STATIC_ALIAS(_decl, _for) _decl { return _for; }
+#define STATIC_ALIAS(_decl, _for) _decl PCI_ABI { return _for; }
+#define DEFINE_ALIAS(_decl, _for) extern _decl __attribute__((alias(#_for)))
+#define SYMBOL_VERSION(_int, _ext) asm(".symver " #_int "," #_ext)
 #else
 #define STATIC_ALIAS(_decl, _for)
+#define DEFINE_ALIAS(_decl, _for)
+#define SYMBOL_VERSION(_int, _ext)
 #endif
-#define DEFINE_ALIAS(_decl, _for) extern _decl __attribute__((alias(#_for)))
-#define SYMBOL_VERSION(_int, _ext) asm(".symver " #_int "," #_ext)
 #else
 #define STATIC_ALIAS(_decl, _for) _decl { return _for; }
 #define DEFINE_ALIAS(_decl, _for)