tFix no-network builds - vaccinewars - be a doctor and try to vaccinate the world
 (HTM) git clone git://src.adamsgaard.dk/vaccinewars
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 51b55acce77a77640c955dc442a724f9ca1b25ca
 (DIR) parent 0e228bac539b2890789b2c8457a0cd62f427a5cd
 (HTM) Author: Ben Webb <ben@salilab.org>
       Date:   Thu, 12 Nov 2020 23:44:40 -0800
       
       Fix no-network builds
       
       Diffstat:
         M src/curses_client/curses_client.c   |       4 ++++
         M src/gui_client/gtk_client.c         |       4 ++++
         M src/gui_client/newgamedia.c         |       6 ++++--
         M src/serverside.c                    |       2 ++
       
       4 files changed, 14 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/src/curses_client/curses_client.c b/src/curses_client/curses_client.c
       t@@ -2662,7 +2662,9 @@ void CursesLoop(struct CMDLINE *cmdline)
          BackupConfig();
        
          start_curses();
       +#ifdef NETWORKING
          CurlInit(&MetaConn);
       +#endif
          Width = COLS;
          Depth = LINES;
        
       t@@ -2693,5 +2695,7 @@ void CursesLoop(struct CMDLINE *cmdline)
          } while (c == 'Y');
          FirstClient = RemovePlayer(Play, FirstClient);
          end_curses();
       +#ifdef NETWORKING
          CurlCleanup(&MetaConn);
       +#endif
        }
 (DIR) diff --git a/src/gui_client/gtk_client.c b/src/gui_client/gtk_client.c
       t@@ -2334,11 +2334,15 @@ gboolean GtkLoop(int *argc, char **argv[],
        
          SetIcon(window, dopewars_pill_xpm);
        
       +#ifdef NETWORKING
          CurlInit(&MetaConn);
       +#endif
        
          gtk_main();
        
       +#ifdef NETWORKING
          CurlCleanup(&MetaConn);
       +#endif
        
          /* Free the main player */
          FirstClient = RemovePlayer(ClientData.Play, FirstClient);
 (DIR) diff --git a/src/gui_client/newgamedia.c b/src/gui_client/newgamedia.c
       t@@ -400,6 +400,7 @@ static void CloseNewGameDia(GtkWidget *widget, gpointer data)
          NewGameType = gtk_notebook_get_current_page(GTK_NOTEBOOK(stgam.notebook));
        }
        
       +#ifdef NETWORKING
        static void metalist_row_select(GtkWidget *clist, gint row, gint column,
                                        GdkEvent *event, GtkWidget *conn_button)
        {
       t@@ -411,6 +412,7 @@ static void metalist_row_unselect(GtkWidget *clist, gint row, gint column,
        {
          gtk_widget_set_sensitive(conn_button, FALSE);
        }
       +#endif
        
        #ifdef NETWORKING
        void NewGameDialog(Player *play, NBCallBack sockstat, CurlConnection *MetaConn)
       t@@ -419,12 +421,12 @@ void NewGameDialog(Player *play)
        #endif
        {
          GtkWidget *vbox, *vbox2, *hbox, *label, *entry, *notebook;
       -  GtkWidget *frame, *button, *dialog, *defbutton;
       +  GtkWidget *frame, *button, *dialog;
          GtkAccelGroup *accel_group;
          guint AccelKey;
        
        #ifdef NETWORKING
       -  GtkWidget *clist, *scrollwin, *table, *hbbox;
       +  GtkWidget *clist, *scrollwin, *table, *hbbox, *defbutton;
          gchar *server_titles[5], *ServerEntry, *text;
          gboolean UpdateMeta = FALSE;
          SetCurlCallback(MetaConn, glib_timeout, glib_socket);
 (DIR) diff --git a/src/serverside.c b/src/serverside.c
       t@@ -3678,7 +3678,9 @@ long GetMinimumTimeout(GSList *First)
          time_t timenow;
        
          timenow = time(NULL);
       +#ifdef NETWORKING
          curl_multi_timeout(MetaConn.multi, &mintime);
       +#endif
          if (AddTimeout(MetaMinTimeout, timenow, &mintime))
            return 0;
          if (AddTimeout(MetaUpdateTimeout, timenow, &mintime))