diff --git a/src/browser.h b/src/browser.h
index 41a44e6f99623e87015249388647375db8f51626..e748cd2efd8b621efba7e34a699de4ae1b3eed9a 100644
--- a/src/browser.h
+++ b/src/browser.h
@@ -28,7 +28,6 @@
 
 #include "global.h"
 
-int  confirm_quit;
 int  browse_key(int);
 void browse_draw(void);
 void browse_init(struct dir *);
diff --git a/src/dir.h b/src/dir.h
index 0b7bf363440a1817d46bfd64f0ac9bf072b68a3d..3221c45b2e9ba90a4acd0eea28e6fbf0f06beeda 100644
--- a/src/dir.h
+++ b/src/dir.h
@@ -103,7 +103,7 @@ int dir_export_init(const char *fn);
 
 
 /* Function set by input code. Returns dir_output.final(). */
-int (*dir_process)();
+extern int (*dir_process)();
 
 /* Scanning a live directory */
 extern int dir_scan_smfs;
diff --git a/src/dir_common.c b/src/dir_common.c
index f17fa2c5a43c6a96cd35445f21100315c4c7092c..284a981803383a51fcf88b055725f77875b19cd9 100644
--- a/src/dir_common.c
+++ b/src/dir_common.c
@@ -31,6 +31,7 @@
 #include <stdarg.h>
 
 
+int (*dir_process)();
 char *dir_curpath;   /* Full path of the last seen item. */
 struct dir_output dir_output;
 char *dir_fatalerr; /* Error message on a fatal error. (NULL if there was no fatal error) */
diff --git a/src/main.c b/src/main.c
index 6ce951d6f30e9c4a62cd95e679f9e7ac86bc1cca..982e3373a41aef2e378238933c91aa962148e2df 100644
--- a/src/main.c
+++ b/src/main.c
@@ -42,6 +42,7 @@ long update_delay = 100;
 int cachedir_tags = 0;
 int extended_info = 0;
 int follow_symlinks = 0;
+int confirm_quit = 0;
 
 static int min_rows = 17, min_cols = 60;
 static int ncurses_init = 0;