Description: Fix FTBFS with GCC 10.
Author: Yavor Doganov <yavor@gnu.org>
Bug-Debian: https://bugs.debian.org/957308
Forwarded: https://savannah.nongnu.org/bugs/index.php?58645
Last-Update: 2020-06-23
---

--- grdesktop-0.23+d040330.orig/src/global.h
+++ grdesktop-0.23+d040330/src/global.h
@@ -64,49 +64,47 @@
 #define KBPATH "/usr/local/share/rdesktop/keymaps/"
 #endif
 
-GList *hostnames;
-GList *rdp_protocols;
-GList *screensize;
-GList *colors;
-GList *sound_options;
-GHashTable *config;
-GSettings *gcfg;
+extern GList *hostnames;
+extern GList *rdp_protocols;
+extern GList *screensize;
+extern GList *colors;
+extern GList *sound_options;
+extern GHashTable *config;
+extern GSettings *gcfg;
 
 /* these widgets are used global */
-GtkWidget *window_main;
-GtkWidget *image_normal;
-GtkWidget *image_process;
-GtkWidget *box_server;
-GtkWidget *box_option;
-GtkWidget *btn_connect;
-GtkWidget *btn_cancel;
-GtkWidget *btn_option;
-GtkWidget *combo_host;
-GtkWidget *combo_host2;
-GtkWidget *input_username;
-GtkWidget *input_password;
-GtkWidget *input_domain;
-GtkWidget *check_savepw;
-GtkWidget *menu_rdp_proto;
-GtkAdjustment *adj_screensize;
-GtkWidget *scroll_screensize;
-GtkWidget *geometry_label;
-GtkWidget *menu_colorsize;
-GtkWidget *image_colorsize;
-GtkWidget *tree_keymap;
-GtkWidget *menu_sound;
-GtkWidget *check_prog;
-GtkWidget *input_program;
-GtkWidget *input_ppath;
-GtkWidget *check_bitmapupd;
-GtkWidget *check_motionevt;
-GtkWidget *check_hidewmdecoration;
-GtkWidget *check_noencr;
-GtkWidget *check_wmkeybindings;
-GtkWidget *check_attconsole;
-GtkWidget *combo_clientname;
-GtkWidget *check_sshopts;
-GtkWidget *btn_sshopts;
+extern GtkWidget *window_main;
+extern GtkWidget *image_normal;
+extern GtkWidget *image_process;
+extern GtkWidget *box_server;
+extern GtkWidget *box_option;
+extern GtkWidget *btn_option;
+extern GtkWidget *combo_host;
+extern GtkWidget *combo_host2;
+extern GtkWidget *input_username;
+extern GtkWidget *input_password;
+extern GtkWidget *input_domain;
+extern GtkWidget *check_savepw;
+extern GtkWidget *menu_rdp_proto;
+extern GtkAdjustment *adj_screensize;
+extern GtkWidget *scroll_screensize;
+extern GtkWidget *geometry_label;
+extern GtkWidget *menu_colorsize;
+extern GtkWidget *image_colorsize;
+extern GtkWidget *tree_keymap;
+extern GtkWidget *menu_sound;
+extern GtkWidget *check_prog;
+extern GtkWidget *input_program;
+extern GtkWidget *input_ppath;
+extern GtkWidget *check_bitmapupd;
+extern GtkWidget *check_motionevt;
+extern GtkWidget *check_hidewmdecoration;
+extern GtkWidget *check_noencr;
+extern GtkWidget *check_wmkeybindings;
+extern GtkWidget *check_attconsole;
+extern GtkWidget *combo_clientname;
+extern GtkWidget *check_sshopts;
+extern GtkWidget *btn_sshopts;
 
 void error_dialog(gchar *msg, ...);
 
--- grdesktop-0.23+d040330.orig/src/main.c
+++ grdesktop-0.23+d040330/src/main.c
@@ -22,6 +22,18 @@
 
 #include "main.h"
 
+GList *hostnames;
+GList *screensize;
+GList *colors;
+GHashTable *config;
+GSettings *gcfg;
+
+GtkWidget *window_main;
+GtkWidget *image_normal;
+GtkWidget *image_process;
+GtkWidget *box_server;
+GtkWidget *box_option;
+
 void error_dialog(gchar *msg, ...) {
 	GtkWidget *dlg;
 	gchar *dlg_msg;
--- grdesktop-0.23+d040330.orig/src/options.c
+++ grdesktop-0.23+d040330/src/options.c
@@ -22,6 +22,9 @@
 
 #include "options.h"
 
+GList *rdp_protocols;
+GList *sound_options;
+
 void fillRdpProtocols() {
 	rdp_protocols = g_list_append(rdp_protocols, g_strdup(_("Windows NT/2000")));
 	rdp_protocols = g_list_append(rdp_protocols, g_strdup(_("Windows XP/2003")));
--- grdesktop-0.23+d040330.orig/src/btnbox.c
+++ grdesktop-0.23+d040330/src/btnbox.c
@@ -22,11 +22,16 @@
 
 #include "btnbox.h"
 
+GtkWidget *btn_option;
+pid_t child_pid;
+
 GtkWidget *button_box() {
 	GtkWidget *box;
 	GtkWidget *btnHelp;
 	GtkWidget *btnAbout;
 	GtkWidget *image;
+	GtkWidget *btn_connect;
+	GtkWidget *btn_cancel;
 
 	box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 10);
 
--- grdesktop-0.23+d040330.orig/src/optbox.c
+++ grdesktop-0.23+d040330/src/optbox.c
@@ -23,6 +23,32 @@
 #include "optbox.h"
 #include "sshbox.h"
 
+GtkWidget *combo_host2;
+GtkWidget *input_username;
+GtkWidget *input_password;
+GtkWidget *input_domain;
+GtkWidget *check_savepw;
+GtkWidget *menu_rdp_proto;
+GtkAdjustment *adj_screensize;
+GtkWidget *scroll_screensize;
+GtkWidget *geometry_label;
+GtkWidget *menu_colorsize;
+GtkWidget *image_colorsize;
+GtkWidget *tree_keymap;
+GtkWidget *menu_sound;
+GtkWidget *check_prog;
+GtkWidget *input_program;
+GtkWidget *input_ppath;
+GtkWidget *check_bitmapupd;
+GtkWidget *check_motionevt;
+GtkWidget *check_hidewmdecoration;
+GtkWidget *check_noencr;
+GtkWidget *check_wmkeybindings;
+GtkWidget *check_attconsole;
+GtkWidget *combo_clientname;
+GtkWidget *check_sshopts;
+GtkWidget *btn_sshopts;
+
 GtkWidget *option_box() {
 	GtkWidget *note;
 	GtkWidget *page1, *page2, *page3, *page4, *page5;
--- grdesktop-0.23+d040330.orig/src/srvsel.c
+++ grdesktop-0.23+d040330/src/srvsel.c
@@ -22,6 +22,8 @@
 
 #include "srvsel.h"
 
+GtkWidget *combo_host;
+
 GtkWidget *server_box() {
 	GList *l;
 	GtkWidget *box;
--- grdesktop-0.23+d040330.orig/src/run.h
+++ grdesktop-0.23+d040330/src/run.h
@@ -31,7 +31,7 @@
 #include "global.h"
 #include "options.h"
 
-pid_t child_pid;	/* infos about child processes */
+extern pid_t child_pid;	/* infos about child processes */
 
 void run_rdesktop();
 
--- grdesktop-0.23+d040330.orig/src/sshbox.c
+++ grdesktop-0.23+d040330/src/sshbox.c
@@ -22,6 +22,9 @@
 
 #include "sshbox.h"
 
+GtkWidget *check_enablessh;
+GtkWidget *input_user, *input_host;
+
 void ssh_showbox(GtkWidget *widget, int status) {
 	GtkWidget *dlg;
 
--- grdesktop-0.23+d040330.orig/src/sshbox.h
+++ grdesktop-0.23+d040330/src/sshbox.h
@@ -28,9 +28,6 @@
 #include "config.h"
 #include "global.h"
 
-GtkWidget *check_enablessh;
-GtkWidget *input_user, *input_host;
-
 void ssh_showbox(GtkWidget *widget, int status);
 void ssh_createdialog(GtkWidget *widget);
 void ssh_updatebox(int status);
