From: Ralph Ronnquist rrq@rrq.au Date: Thu, 16 Nov 2023 01:10:40 +0000 (+0000) Subject: Add externs to avoid multiple definitions, and then add missing definitions. X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;ds=inline;p=rrq%2Fmaintain_lilo.git Add externs to avoid multiple definitions, and then add missing definitions. --- diff --git a/debian/patches/20_add_extern_tags.patch b/debian/patches/20_add_extern_tags.patch new file mode 100644 index 0000000..127b43c --- /dev/null +++ b/debian/patches/20_add_extern_tags.patch @@ -0,0 +1,82 @@ +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); + diff --git a/debian/patches/series b/debian/patches/series index b26bbeb..17e2718 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -6,3 +6,4 @@ 08_small-typos-in-manpages.patch 09_fix-manpage-lilo-conf-5.patch 10_fix-manpage-lilo-conf-5.patch +20_add_extern_tags.patch