Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation under GCC 10+ #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions gui/Config.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

#include "Linux.h"

char cfgfile_basename[MAXPATHLEN];
char cfgfile[MAXPATHLEN];

/* TODO escaping/unescaping would be nice, as would maxchars */
static void GetValue(char *src, char *name, char *outvar) {
char *tmp;
Expand Down
4 changes: 2 additions & 2 deletions gui/Linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 0 additions & 2 deletions plugins/bladesio1/sio1.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ static const unsigned char build = 1;

static void (CALLBACK *irqCallback)() = 0;

Settings settings;

/* sio status flags.
*/
enum {
Expand Down
2 changes: 1 addition & 1 deletion plugins/dfinput/pad.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions plugins/dfnet/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

#define CFG_FILENAME "dfnet.cfg"

Config conf;

void SaveConf() {
FILE *f;

Expand Down
30 changes: 15 additions & 15 deletions plugins/dfnet/dfnet.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ __private_extern char* PLUGLOC(char* toloc);

typedef void* HWND;

struct timeval tm;
extern struct timeval tm;

#define CALLBACK

Expand All @@ -70,24 +70,24 @@ typedef struct {
char ipAddress[32];
} Config;

Config conf;
extern Config conf;

void LoadConf();
void SaveConf();

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();
long sockShutdown();
Expand Down