--- a/common/legacy_indexer.c
+++ b/common/legacy_indexer.c
@@ -38,7 +38,7 @@
 extern dump_ino_t volinfo[];  // TP_NINOS
 extern int tapeno;
 
-static int Afile = -1;	/* archive file descriptor */
+/* main.c must be able to set the fd, must not be static */ int Afile = -1;	/* archive file descriptor */
 static int AfileActive = 1;/* Afile flag */
 
 //extern char *Apath;
--- a/dump/main.c
+++ b/dump/main.c
@@ -104,7 +104,7 @@ char	*dumpdates;	/* name of the file con
 char	lastlevel[NUM_STR_SIZE];/* dump level of previous dump */
 char	level[NUM_STR_SIZE];/* dump level of this dump */
 int	zipflag;	/* which compression method */
-int	Afile = -1;	/* archive file descriptor */
+extern int	Afile;	/* archive file descriptor */
 int	AfileActive = 1;/* Afile flag */
 int	uflag;		/* update flag */
 int	mflag;		/* dump metadata only if possible */
