diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | common.h | 3 | ||||
-rw-r--r-- | generate_pciclass.pl | 2 | ||||
-rwxr-xr-x | generate_usbclass.pl | 2 | ||||
-rw-r--r-- | libldetect.h | 2 |
5 files changed, 9 insertions, 2 deletions
@@ -12,7 +12,7 @@ binaries = lspcidrake lib_objs = common.o pciusb.o pci.o usb.o pciclass.o usbclass.o dmi.o lib_major = libldetect.so.$(LIB_MAJOR) libraries = libldetect.so $(lib_major) $(lib_major).$(LIB_MINOR) libldetect.a -CFLAGS = -Wall -W -Wstrict-prototypes -Os -fPIC +CFLAGS = -Wall -W -Wstrict-prototypes -Os -fPIC -fvisibility=hidden RPM ?= $(HOME)/rpm @@ -1,3 +1,5 @@ +#pragma GCC visibility push(hidden) + #ifndef LIBLDETECT_COMMON #define LIBLDETECT_COMMON @@ -27,3 +29,4 @@ extern fh fh_open(const char *name) NON_EXPORTED; #define fh_close(f) gzclose(f); #endif +#pragma GCC visibility pop diff --git a/generate_pciclass.pl b/generate_pciclass.pl index 15731d6..948431d 100644 --- a/generate_pciclass.pl +++ b/generate_pciclass.pl @@ -15,6 +15,7 @@ print ' static int nb_classes = sizeof(classes) / sizeof(*classes); +#pragma GCC visibility push(default) extern const char *pci_class2text(unsigned long class_id) { int i; for (i = 0; i < nb_classes; i++) @@ -22,5 +23,6 @@ extern const char *pci_class2text(unsigned long class_id) { return pci_class2text(0); } +#pragma GCC visibility pop '; diff --git a/generate_usbclass.pl b/generate_usbclass.pl index 4aadddc..de533ed 100755 --- a/generate_usbclass.pl +++ b/generate_usbclass.pl @@ -68,7 +68,7 @@ struct class_text { const char *prot_text; }; -extern struct class_text usb_class2text(unsigned long class_id) { +extern struct class_text __attribute__ ((visibility("default"))) usb_class2text(unsigned long class_id) { const char *p[3] = { NULL, NULL, NULL }; int a_class[3] = { (class_id >> 16) & 0xff, (class_id >> 8) & 0xff, class_id & 0xff }; if (a_class[0] != 0xff) lookup(p, a_class, 0, nb_classes, classes); diff --git a/libldetect.h b/libldetect.h index 2e663bb..4e9b2d1 100644 --- a/libldetect.h +++ b/libldetect.h @@ -1,3 +1,4 @@ +#pragma GCC visibility push(default) #ifndef LIBLDETECT #define LIBLDETECT @@ -69,3 +70,4 @@ extern void dmi_entries_free(struct dmi_entries entries); extern char *dmidecode_file; #endif +#pragma GCC visibility pop |