File fix.patch of Package lincity
From 0aa5805a7da37668395b301f66822662509d6900 Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
Date: Tue, 2 Dec 2025 11:35:00 +0000
Subject: [PATCH] Fix build on Tumbleweed
and Leap 16.0
---
configure.ac | 2 ++
fileutil.c | 2 +-
ldsvgui.c | 4 ++--
ldsvguts.c | 2 +-
mouse.c | 2 +-
screen.h | 2 +-
6 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7a9b2ad..68a8387 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,6 +89,8 @@ else
PROGS="$PROGS X_PROGS")
fi
fi
+AC_DEFINE(LC_X11)
+AH_TEMPLATE([LC_X11],[Tell it that we have X11])
if eval "test x$with_svga = xyes"; then
LCLIBS="$LCLIBS LCSVGA_LIBS"
else
diff --git a/fileutil.c b/fileutil.c
index 5b85af6..2fd6f3d 100644
--- a/fileutil.c
+++ b/fileutil.c
@@ -105,7 +105,7 @@ static const char *guess_category_value (int category,
* ---------------------------------------------------------------------- */
char LIBDIR[LC_PATH_MAX];
-char *lc_save_dir;
+extern char *lc_save_dir;
int lc_save_dir_len;
static char *lc_temp_filename;
diff --git a/ldsvgui.c b/ldsvgui.c
index a9c8126..26f2a70 100644
--- a/ldsvgui.c
+++ b/ldsvgui.c
@@ -99,8 +99,8 @@ char LIBDIR[_MAX_PATH];
char LIBDIR[256];
#endif
-char *lc_save_dir;
-char save_names[10][42];
+extern char *lc_save_dir;
+extern char save_names[10][42];
/* ---------------------------------------------------------------------- *
* Public Functions
diff --git a/ldsvguts.c b/ldsvguts.c
index 86c3dbc..2d9b9f2 100644
--- a/ldsvguts.c
+++ b/ldsvguts.c
@@ -91,7 +91,7 @@ int verify_city (char *cname);
* Private Global Variables
* ---------------------------------------------------------------------- */
-char save_names[10][42];
+extern char save_names[10][42];
/* ---------------------------------------------------------------------- *
* Public functions
diff --git a/mouse.c b/mouse.c
index 8e7f944..b1f9195 100644
--- a/mouse.c
+++ b/mouse.c
@@ -1152,7 +1152,7 @@ mt_perm(int x, int y)
}
int
-do_mt_draw (int x1, int x2, int y1, int y2, int (*mode)())
+do_mt_draw (int x1, int x2, int y1, int y2, int (*mode)(int,int))
{
int dir = 1;
int horiz = 1;
diff --git a/screen.h b/screen.h
index a359281..7543474 100644
--- a/screen.h
+++ b/screen.h
@@ -20,7 +20,7 @@ extern unsigned char start_font1[2048];
extern unsigned char start_font2[4096];
extern unsigned char start_font3[4096];
-int monthgraph_style;
+extern int monthgraph_style;
/* This is on in screen_full_refresh, used in *_refresh() */
extern char screen_refreshing;
--
2.51.0