Add externs to avoid multiple definitions, and then add missing definitions.
[rrq/maintain_lilo.git] / debian / patches / 20_add_extern_tags.patch
1 diff --git a/src/bsect.c b/src/bsect.c
2 index af26ca7..003ede9 100644
3 --- a/src/bsect.c
4 +++ b/src/bsect.c
5 @@ -54,7 +54,7 @@
6  #endif
7  
8  
9 -int boot_dev_nr;
10 +extern int boot_dev_nr;
11  
12  static BOOT_SECTOR bsect,bsect_orig;
13  static MENUTABLE menuparams;
14 diff --git a/src/common.c b/src/common.c
15 index 1a86aa1..6da0998 100644
16 --- a/src/common.c
17 +++ b/src/common.c
18 @@ -22,7 +22,8 @@
19  #ifndef SHS_MAIN
20  LILO_EXTRA extra;
21  char *identify = NULL;
22 -int boot_dev_nr, raid_index, do_md_install;
23 +int boot_dev_nr, raid_index, do_md_install, ndisk, md_bios;
24 +
25  int verbose = 0, test = 0, compact = 0, linear = 0, raid_flags = 0, zflag = 0,
26        ireloc = 0, force_fs = 0, force_raid = 0, extended_pt = 0, query = 0,
27        nowarn = 0, lba32 = 0, autoauto = 0, passw = 0, geometric = 0, eflag = 0;
28 @@ -49,7 +50,6 @@ int curr_prt_map;
29      exit(1);
30  }
31  
32 -
33  /*volatile*/ void __attribute__ ((format (printf, 1, 2))) die(const char *fmt,...)
34  {
35      va_list ap;
36 diff --git a/src/identify.c b/src/identify.c
37 index 369f273..1bbe3c3 100644
38 --- a/src/identify.c
39 +++ b/src/identify.c
40 @@ -19,7 +19,7 @@
41  #include "common.h"
42  #include "cfg.h"
43  
44 -char *identify;
45 +extern char *identify;
46  static char *opt;
47  static char *first, *dflt;
48  static int idefault;
49 diff --git a/src/raid.c b/src/raid.c
50 index fc0dc65..bdb4334 100644
51 --- a/src/raid.c
52 +++ b/src/raid.c
53 @@ -41,7 +41,7 @@ static int raid_device[MAX_RAID+1];
54  static int raid_bios[MAX_RAID+1];
55  static int device;
56  enum {MD_NULL=0, MD_PARALLEL, MD_MIXED, MD_SKEWED};
57 -int do_md_install, ndisk, md_bios;
58 +extern int do_md_install, ndisk, md_bios;
59  static char *raid_list[MAX_RAID];
60  static int list_index[MAX_RAID];
61  static int nlist, faulty;
62 diff --git a/src/raid.h b/src/raid.h
63 index 865c1a8..7748e89 100644
64 --- a/src/raid.h
65 +++ b/src/raid.h
66 @@ -8,12 +8,12 @@
67   * in the source directory.
68   */
69  
70 -int do_md_install, ndisk, md_bios;
71 +extern int do_md_install, ndisk, md_bios;
72  
73 -int raid_setup(void);
74 -void raid_final(void);
75 +extern int raid_setup(void);
76 +extern void raid_final(void);
77  
78  /* form the mask of the raid bios codes and the list of offsets */
79  /* this information goes into the MENUTABLE passed to the loader */
80 -int raid_mask(int *offsets);
81 +extern int raid_mask(int *offsets);
82