xref: /OK3568_Linux_fs/buildroot/package/ympd/0002-added-forward-declarations.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 2268e0f0f372a61827b912155a1796490968b3ff Mon Sep 17 00:00:00 2001
2From: SuperBFG7 <daniel@despite.ch>
3Date: Tue, 2 Jun 2020 12:41:52 +0200
4Subject: [PATCH] added forward declarations
5
6
7[Retrieved (and slightly updated to remove update of dirble_api_token)
8from:
9https://github.com/notandy/ympd/pull/191/commits/2268e0f0f372a61827b912155a1796490968b3ff]
10Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
11---
12 src/mpd_client.c | 2 ++
13 src/mpd_client.h | 6 ++++--
14 2 files changed, 6 insertions(+), 2 deletions(-)
15
16diff --git a/src/mpd_client.c b/src/mpd_client.c
17index 2911e461..9f003ab0 100644
18--- a/src/mpd_client.c
19+++ b/src/mpd_client.c
20@@ -30,6 +30,8 @@
21
22 /* forward declaration */
23 static int mpd_notify_callback(struct mg_connection *c, enum mg_event ev);
24+char dirble_api_token[28];
25+struct t_mpd mpd;
26
27 const char * mpd_cmd_strs[] = {
28     MPD_CMDS(GEN_STR)
29diff --git a/src/mpd_client.h b/src/mpd_client.h
30index 447dd563..9342c550 100644
31--- a/src/mpd_client.h
32+++ b/src/mpd_client.h
33@@ -96,6 +96,8 @@ struct t_mpd {
34
35     int song_id;
36     unsigned queue_version;
37-} mpd;
38+};
39+
40+extern struct t_mpd mpd;
41
42 struct t_mpd_client_session {
43     int song_id;
44