summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--dmi.c2
-rw-r--r--pci.c4
-rw-r--r--pciusb.c20
4 files changed, 14 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 20973e4..ce5358e 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ build: $(binaries) $(libraries)
lspcidrake: lspcidrake.c libldetect.so
$(lib_major).$(LIB_MINOR): $(lib_objs)
- $(CC) -shared -Wl,-soname,$(lib_major) -o $@ $^ -lpci -lmodprobe -lz
+ ld -O1 -z relro -shared -soname,$(lib_major) -o $@ $^ -lpci -lmodprobe -lz -lc
$(lib_major): $(lib_major).$(LIB_MINOR)
ln -sf $< $@
libldetect.so: $(lib_major)
diff --git a/dmi.c b/dmi.c
index 2605e5f..b0df357 100644
--- a/dmi.c
+++ b/dmi.c
@@ -22,7 +22,7 @@ struct category {
const char **fields;
};
-static struct category categories[] = {
+static const struct category categories[] = {
{ "BIOS", psizeof(cat_BIOS), cat_BIOS },
{ "System", psizeof(cat_System), cat_System },
{ "Base Board", psizeof(cat_Base_Board), cat_Base_Board },
diff --git a/pci.c b/pci.c
index ed76153..d9f516a 100644
--- a/pci.c
+++ b/pci.c
@@ -13,9 +13,9 @@
#include "common.h"
static char *proc_pci_path_default = "/proc/bus/pci/devices";
-char *proc_pci_path = NULL;
+char* proc_pci_path = NULL;
-void __attribute__((noreturn)) error_and_die(char *msg, ...)
+static void __attribute__((noreturn)) error_and_die(char *msg, ...)
{
va_list args;
diff --git a/pciusb.c b/pciusb.c
index 490d2b3..aa1530e 100644
--- a/pciusb.c
+++ b/pciusb.c
@@ -10,16 +10,16 @@
#include <modprobe.h>
#include "common.h"
-struct utsname rel_buf;
-struct module_command *commands = NULL;
-struct module_options *modoptions = NULL;
-struct module_alias *aliases = NULL;
-struct module_blacklist *blacklist = NULL;
-const char *config = NULL;
-
-char *optstring;
-char *aliasfilename, *symfilename;
-int init;
+static struct utsname rel_buf;
+static struct module_command *commands = NULL;
+static struct module_options *modoptions = NULL;
+static struct module_alias *aliases = NULL;
+static struct module_blacklist *blacklist = NULL;
+static const char *config = NULL;
+
+static char *optstring;
+static char *aliasfilename, *symfilename;
+static int init;
static void find_modules_through_aliases(struct pciusb_entries *entries) {
unsigned int i;