File fix-build.patch of Package mures
diff --git a/src/client.c b/src/client.c
index 027260a..9107bdc 100644
--- a/src/client.c
+++ b/src/client.c
@@ -37,7 +37,7 @@ USA
int client_initialized = 0;
UDPsocket local_socket = NULL;
-UDPpacket *packet;
+static UDPpacket *packet;
#define PACKET_POOL_SIZE 20
diff --git a/src/game_output.c b/src/game_output.c
index cedba6b..e8af465 100644
--- a/src/game_output.c
+++ b/src/game_output.c
@@ -31,6 +31,11 @@ USA
#include "go_sdl.h"
#include "go_gl.h"
+void (*game_output_handle_event)(game *g, int event, float x, float y, direction dir);
+void (*game_output_refresh)(game *g, SDL_Surface *out);
+void (*game_output_bigchange)(game *g);
+void (*game_output_exit)(game *g);
+
void game_output_init(game *g, int type)
{
switch(type) {
diff --git a/src/game_output.h b/src/game_output.h
index f83e833..a8f45dc 100644
--- a/src/game_output.h
+++ b/src/game_output.h
@@ -38,10 +38,10 @@ enum {
GL
};
-void (*game_output_handle_event)(game *g, int event, float x, float y, direction dir);
-void (*game_output_refresh)(game *g, SDL_Surface *out);
-void (*game_output_bigchange)(game *g);
-void (*game_output_exit)(game *g);
+extern void (*game_output_handle_event)(game *g, int event, float x, float y, direction dir);
+extern void (*game_output_refresh)(game *g, SDL_Surface *out);
+extern void (*game_output_bigchange)(game *g);
+extern void (*game_output_exit)(game *g);
void game_output_init(game *g, int type);
diff --git a/src/gi_sdl.c b/src/gi_sdl.c
index 560db5a..a039796 100644
--- a/src/gi_sdl.c
+++ b/src/gi_sdl.c
@@ -41,6 +41,8 @@ USA
#include "lua_keys.h"
#include "output.h"
+gi_sdl_settings ks;
+
typedef struct _gi_sdl_player
{
int exists;
@@ -455,7 +457,7 @@ int gi_sdl_init()
{
int i, j;
- for(i=0; i<SDLK_LAST; i++) {
+ for(i=0; i<=SDLK_UNDO; i++) {
ks.key_up_action[i].exists = 0;
ks.key_down_action[i].exists = 0;
}
diff --git a/src/gi_sdl.h b/src/gi_sdl.h
index 6e977b6..325adf5 100644
--- a/src/gi_sdl.h
+++ b/src/gi_sdl.h
@@ -88,7 +88,7 @@ typedef struct _gi_sdl_settings
int joy_y[MAX_JOY];
} gi_sdl_settings;
-gi_sdl_settings ks;
+extern gi_sdl_settings ks;
int gi_sdl_player_exists(game *g, int p);
grid_int_position gi_sdl_player_grid_pos(game *g, int p);
diff --git a/src/gui.c b/src/gui.c
index ad9de3d..f576a30 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -37,6 +37,8 @@ USA
#include "map.h"
#include "go_sdl.h"
+int factor_h, factor_w;
+
/* types */
enum
{
diff --git a/src/gui.h b/src/gui.h
index 6cdbdfd..cfd6b0b 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -47,6 +47,6 @@ int gui_add_checkbox(float x, float y, bool *boolp, char *text, void (*callback)
void gui_remove_object(int i);
void gui_clear();
-int factor_h, factor_w;
+extern int factor_h, factor_w;
#endif
diff --git a/src/lua.c b/src/lua.c
index b346955..43ab6bc 100644
--- a/src/lua.c
+++ b/src/lua.c
@@ -4,6 +4,7 @@
#include "SDL.h"
#include "lua.h"
+lua_State *L;
/*
static int lua_load_image(lua_State *L)
{
diff --git a/src/lua.h b/src/lua.h
index 08d0684..664873e 100644
--- a/src/lua.h
+++ b/src/lua.h
@@ -4,7 +4,7 @@
#include "lua/lua.h"
-lua_State *L;
+extern lua_State *L;
int lua_init();
void lua_exit();
diff --git a/src/main.c b/src/main.c
index cc3a237..7468c1a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -44,6 +44,7 @@ USA
#include "lua.h"
root_type root;
+int opengl;
void root_quit()
{
diff --git a/src/main.h b/src/main.h
index c2cdd61..a925e3c 100644
--- a/src/main.h
+++ b/src/main.h
@@ -44,6 +44,6 @@ USA
void root_quit();
-int opengl;
+extern int opengl;
#endif
diff --git a/src/server.c b/src/server.c
index 21cad91..a838cf7 100644
--- a/src/server.c
+++ b/src/server.c
@@ -42,7 +42,7 @@ static SDLNet_SocketSet socketset = NULL;
int server_initialized=0;
-UDPpacket *packet;
+static UDPpacket *packet;
typedef struct _client_type {
int exists;