--- /dev/null
+diff --git a/src/bsect.c b/src/bsect.c
+index af26ca7..003ede9 100644
+--- a/src/bsect.c
++++ b/src/bsect.c
+@@ -54,7 +54,7 @@
+ #endif
+
+
+-int boot_dev_nr;
++extern int boot_dev_nr;
+
+ static BOOT_SECTOR bsect,bsect_orig;
+ static MENUTABLE menuparams;
+diff --git a/src/common.c b/src/common.c
+index 1a86aa1..6da0998 100644
+--- a/src/common.c
++++ b/src/common.c
+@@ -22,7 +22,8 @@
+ #ifndef SHS_MAIN
+ LILO_EXTRA extra;
+ char *identify = NULL;
+-int boot_dev_nr, raid_index, do_md_install;
++int boot_dev_nr, raid_index, do_md_install, ndisk, md_bios;
++
+ int verbose = 0, test = 0, compact = 0, linear = 0, raid_flags = 0, zflag = 0,
+ ireloc = 0, force_fs = 0, force_raid = 0, extended_pt = 0, query = 0,
+ nowarn = 0, lba32 = 0, autoauto = 0, passw = 0, geometric = 0, eflag = 0;
+@@ -49,7 +50,6 @@ int curr_prt_map;
+ exit(1);
+ }
+
+-
+ /*volatile*/ void __attribute__ ((format (printf, 1, 2))) die(const char *fmt,...)
+ {
+ va_list ap;
+diff --git a/src/identify.c b/src/identify.c
+index 369f273..1bbe3c3 100644
+--- a/src/identify.c
++++ b/src/identify.c
+@@ -19,7 +19,7 @@
+ #include "common.h"
+ #include "cfg.h"
+
+-char *identify;
++extern char *identify;
+ static char *opt;
+ static char *first, *dflt;
+ static int idefault;
+diff --git a/src/raid.c b/src/raid.c
+index fc0dc65..bdb4334 100644
+--- a/src/raid.c
++++ b/src/raid.c
+@@ -41,7 +41,7 @@ static int raid_device[MAX_RAID+1];
+ static int raid_bios[MAX_RAID+1];
+ static int device;
+ enum {MD_NULL=0, MD_PARALLEL, MD_MIXED, MD_SKEWED};
+-int do_md_install, ndisk, md_bios;
++extern int do_md_install, ndisk, md_bios;
+ static char *raid_list[MAX_RAID];
+ static int list_index[MAX_RAID];
+ static int nlist, faulty;
+diff --git a/src/raid.h b/src/raid.h
+index 865c1a8..7748e89 100644
+--- a/src/raid.h
++++ b/src/raid.h
+@@ -8,12 +8,12 @@
+ * in the source directory.
+ */
+
+-int do_md_install, ndisk, md_bios;
++extern int do_md_install, ndisk, md_bios;
+
+-int raid_setup(void);
+-void raid_final(void);
++extern int raid_setup(void);
++extern void raid_final(void);
+
+ /* form the mask of the raid bios codes and the list of offsets */
+ /* this information goes into the MENUTABLE passed to the loader */
+-int raid_mask(int *offsets);
++extern int raid_mask(int *offsets);
+