Backport of 

From 1bb8a8aa29845378903f3c690e17c0867c820da2 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Mon, 16 Mar 2020 13:24:12 +0100
Subject: gcc10 build fix

by Adrian Reber <adrian@lisas.de>

--- fbi-2.10.orig/fbi.c
+++ fbi-2.10/fbi.c
@@ -122,7 +122,7 @@ static int img_mem, max_mem_mb;
 /* framebuffer */
 char                       *fbdev = NULL;
 char                       *fbmode  = NULL;
-int                        fd, switch_last, debug;
+int                        fd, switch_last;
 
 unsigned short red[256],  green[256],  blue[256];
 struct fb_cmap cmap  = { 0, 256, red,  green,  blue };
--- fbi-2.10.orig/filter.c
+++ fbi-2.10/filter.c
@@ -6,8 +6,6 @@
 #include "readers.h"
 #include "filter.h"
 
-int debug = 0;
-
 /* ----------------------------------------------------------------------- */
 
 static void
--- fbi-2.10.orig/idaconfig.h
+++ fbi-2.10/idaconfig.h
@@ -17,7 +17,7 @@
 
 /* -------------------------------------------------------------------------- */
 
-char *ida_lists;
+extern char *ida_lists;
 
 void ida_init_config(void);
 void ida_read_config(void);
--- fbi-2.10.orig/readers.c
+++ fbi-2.10/readers.c
@@ -5,6 +5,8 @@
 
 #include "readers.h"
 
+int debug=0;
+
 /* ----------------------------------------------------------------------- */
 
 void load_bits_lsb(unsigned char *dst, unsigned char *src, int width,
--- fbi-2.10.orig/viewer.c
+++ fbi-2.10/viewer.c
@@ -39,7 +39,6 @@
 
 #define PROCESS_LINES    16
 
-int debug;
 Cursor ptrs[POINTER_COUNT];
 
 /* ----------------------------------------------------------------------- */
