summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/pcsxr-fix-definitions.patch
blob: 8ec389ec09f5e0a234f1446b2f69c8fcd71736a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
There are a lot of global variable definitions that aren't valid on modern compilers. According to upstream's Dockerfile,
this project is meant to compile with GCC 6! So there are some declarations that need to be changed. 

diff --git a/gui/Linux.h b/gui/Linux.h
index 2a939050..99404d93 100644
--- a/gui/Linux.h
+++ b/gui/Linux.h
@@ -44,8 +44,8 @@
 
 extern gboolean UseGui;
 extern int StatesC;
-char cfgfile[MAXPATHLEN];	/* ADB Comment this out - make a local var, or at least use gchar funcs */
-char cfgfile_basename[MAXPATHLEN];	/* ADB Comment this out - make a local var, or at least use gchar funcs */
+extern char cfgfile[MAXPATHLEN];	/* ADB Comment this out - make a local var, or at least use gchar funcs */
+extern char cfgfile_basename[MAXPATHLEN];	/* ADB Comment this out - make a local var, or at least use gchar funcs */
 
 int LoadConfig();
 void SaveConfig();
diff --git a/gui/LnxMain.c b/gui/LnxMain.c
index d6dd9316..02002bc1 100644
--- a/gui/LnxMain.c
+++ b/gui/LnxMain.c
@@ -49,6 +49,9 @@ enum {
 
 gboolean UseGui = TRUE;
 
+char cfgfile[MAXPATHLEN] = {0};
+char cfgfile_basename[MAXPATHLEN] = {0};
+
 static void CreateMemcard(char *filename, char *conf_mcd) {
 	gchar *mcd;
 	struct stat buf;
diff --git a/plugins/bladesio1/sio1.c b/plugins/bladesio1/sio1.c
index 17ac4b65..c6fd585a 100644
--- a/plugins/bladesio1/sio1.c
+++ b/plugins/bladesio1/sio1.c
@@ -55,8 +55,6 @@ static const unsigned char build	= 1;
 
 static void (CALLBACK *irqCallback)(void) = 0;
 
-Settings settings;
-
 /* sio status flags.
  */
 enum {
diff --git a/plugins/dfinput/pad.h b/plugins/dfinput/pad.h
index 8337fe7e..6d44851d 100644
--- a/plugins/dfinput/pad.h
+++ b/plugins/dfinput/pad.h
@@ -151,7 +151,7 @@ typedef struct tagKeyDef {
 enum { ANALOG_XP = 0, ANALOG_XM, ANALOG_YP, ANALOG_YM };
 
 #if SDL_VERSION_ATLEAST(2,0,0)
-SDL_GameControllerButton controllerMap[DKEY_TOTAL];	
+extern SDL_GameControllerButton controllerMap[DKEY_TOTAL];
 #endif
 
 typedef struct tagPadDef {
diff --git a/plugins/dfnet/cfg.c b/plugins/dfnet/cfg.c
index 921efbe3..1057426a 100644
--- a/plugins/dfnet/cfg.c
+++ b/plugins/dfnet/cfg.c
@@ -11,6 +11,8 @@
 
 #include "dfnet.h"
 
+Config conf;
+
 #define CFG_FILENAME "dfnet.cfg"
 
 void SaveConf() {
diff --git a/plugins/dfnet/dfnet.c b/plugins/dfnet/dfnet.c
index 6c6ec5f9..ddc92169 100644
--- a/plugins/dfnet/dfnet.c
+++ b/plugins/dfnet/dfnet.c
@@ -24,6 +24,9 @@ const unsigned char build    = 3;    // increase that with each version
 
 static char *libraryName      = N_("Socket Driver");
 
+fd_set rset;
+fd_set wset;
+
 unsigned long CALLBACK PSEgetLibType(void) {
 	return PSE_LT_NET;
 }
diff --git a/plugins/dfnet/dfnet.h b/plugins/dfnet/dfnet.h
index 937814f5..e2699ad3 100644
--- a/plugins/dfnet/dfnet.h
+++ b/plugins/dfnet/dfnet.h
@@ -56,7 +56,7 @@ __private_extern char* PLUGLOC(char* toloc);
 
 typedef void* HWND;
 
-struct timeval tm;
+extern struct timeval tm;
 
 #define CALLBACK
 
@@ -70,24 +70,24 @@ typedef struct {
 	char ipAddress[32];
 } Config;
 
-Config conf;
+extern Config conf;
 
 void LoadConf(void);
 void SaveConf(void);
 
-int sock;
-char *PadSendData;
-char *PadRecvData;
-char PadSendSize;
-char PadRecvSize;
-char PadSize[2];
-int PadCount;
-int PadCountMax;
-int PadInit;
-int Ping;
-volatile int WaitCancel;
-fd_set rset;
-fd_set wset;
+extern int sock;
+extern char *PadSendData;
+extern char *PadRecvData;
+extern char PadSendSize;
+extern char PadRecvSize;
+extern char PadSize[2];
+extern int PadCount;
+extern int PadCountMax;
+extern int PadInit;
+extern int Ping;
+extern volatile int WaitCancel;
+extern fd_set rset;
+extern fd_set wset;
 
 long sockInit(void);
 long sockShutdown(void);