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 building with GCC 10 / CFLAGS=-fno-common #12

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 src/audioscrobbler.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
#include "queue.h"
#include "scmpc.h"

static struct as_conn_t as_conn;
gchar *buffer;

static void as_parse_error(char *response);
static gboolean as_submit(void);
static gushort build_querystring(gchar **qs);
Expand Down
6 changes: 3 additions & 3 deletions src/audioscrobbler.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@
/**
* Last.fm connection data
*/
struct {
struct as_conn_t {
gchar *session_id;
gint64 last_auth;
gint64 last_fail;
connection_status status;
CURL *handle;
struct curl_slist *headers;
} as_conn;
};

/**
* cURL data buffer
*/
gchar *buffer;
extern gchar *buffer;

/**
* Initialize cURL
Expand Down
2 changes: 2 additions & 0 deletions src/mpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include "queue.h"
#include "scmpc.h"

struct mpd_t mpd;

static void mpd_update(void);
static void mpd_schedule_check(void);
static gboolean mpd_parse(GIOChannel *source, GIOCondition condition,
Expand Down
6 changes: 4 additions & 2 deletions src/mpd.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/**
* MPD connection data
*/
struct {
struct mpd_t {
struct mpd_connection *conn;
struct mpd_status *status;
struct mpd_song *song;
Expand All @@ -41,7 +41,9 @@ struct {
guint idle_source;
guint check_source;
guint reconnect_source;
} mpd;
};

extern struct mpd_t mpd;

/**
* Connect to MPD
Expand Down
2 changes: 2 additions & 0 deletions src/preferences.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#include "preferences.h"
#include "scmpc.h"

struct prefs_t prefs;

static gint cf_log_level(cfg_t *cfg, cfg_opt_t *opt, const gchar *value,
void *result);
static gint cf_validate_num(cfg_t *cfg, cfg_opt_t *opt);
Expand Down
6 changes: 4 additions & 2 deletions src/preferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/**
* scmpc settings
*/
struct {
struct prefs_t {
gchar *mpd_hostname;
gushort mpd_port;
gushort mpd_timeout;
Expand All @@ -47,7 +47,9 @@ struct {
gchar *cache_file;
guint queue_length;
guint cache_interval;
} prefs;
};

extern struct prefs_t prefs;

/**
* Initialize preferences
Expand Down