]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
More fixes to allow gcc-10 to compile without error
authorMike Brady <mikebrady@eircom.net>
Thu, 13 Feb 2020 17:57:30 +0000 (17:57 +0000)
committerMike Brady <mikebrady@eircom.net>
Thu, 13 Feb 2020 17:57:30 +0000 (17:57 +0000)
audio_sndio.c
common.h
dbus-service.c
dbus-service.h
metadata_hub.c
metadata_hub.h
mpris-service.c
mpris-service.h

index 9fd497ace45eedf908a50a8a85930b35bf6f49fc..ac5cfa380ee346658625a8978b9c6171c2b67bb6 100644 (file)
@@ -65,7 +65,7 @@ struct sio_par par;
 
 struct sndio_formats {
   const char *name;
-  enum sps_format_t fmt;
+  sps_format_t fmt;
   unsigned int rate;
   unsigned int bits;
   unsigned int bps;
index 35b21bd96f421ff3ddf707eef7e468fd664fa37a..2c9c05bdb4a8321048948c1ab0dd9281f12857af 100644 (file)
--- a/common.h
+++ b/common.h
 #endif
 
 #if defined(CONFIG_DBUS_INTERFACE) || defined(CONFIG_MPRIS_INTERFACE)
-enum dbus_session_type {
+typedef enum {
   DBT_system = 0, // use the session bus
   DBT_session,    // use the system bus
-} dbt_type;
+} dbus_session_type;
 #endif
 
 #define sps_extra_code_output_stalled 32768
@@ -245,10 +245,10 @@ typedef struct {
   yna_type use_precision_timing; // defaults to no
 
 #if defined(CONFIG_DBUS_INTERFACE)
-  enum dbus_session_type dbus_service_bus_type;
+  dbus_session_type dbus_service_bus_type;
 #endif
 #if defined(CONFIG_MPRIS_INTERFACE)
-  enum dbus_session_type mpris_service_bus_type;
+  dbus_session_type mpris_service_bus_type;
 #endif
 
 #ifdef CONFIG_METADATA_HUB
index 3efde8f132d962396a5522ea10d0ad1ad7a54bc4..1fe59c35d23fad69df83e4b2c510724f0894f4df 100644 (file)
@@ -45,6 +45,8 @@
 #include <FFTConvolver/convolver.h>
 #endif
 
+ShairportSync *shairportSyncSkeleton;
+
 int service_is_running = 0;
 
 ShairportSyncDiagnostics *shairportSyncDiagnosticsSkeleton = NULL;
index 5cfc02e2dcfac67a49cf8fcf0924e6eab7d9cde0..1373e9cb237357d33dd2b9680fe63977b5ab822d 100644 (file)
@@ -3,7 +3,7 @@
 #define DBUS_SERVICE_H
 
 #include "dbus-interface.h"
-ShairportSync *shairportSyncSkeleton;
+extern ShairportSync *shairportSyncSkeleton;
 
 int start_dbus_service();
 void stop_dbus_service();
index fb459b6ba5ef188d28cbada02d7cf408ee26b489..c09759f27cf1dc293b5c8a7ce2fd7bd4a154547d 100644 (file)
@@ -58,6 +58,8 @@
 #include <openssl/md5.h>
 #endif
 
+struct metadata_bundle metadata_store;
+
 int metadata_hub_initialised = 0;
 
 pthread_rwlock_t metadata_hub_re_lock = PTHREAD_RWLOCK_INITIALIZER;
index ed7d947d2a1fa804ba423d17b1ce29db5df6ad19..e7e6988a6d87f56150fe19f8a0649a725bd221fd 100644 (file)
@@ -5,25 +5,25 @@
 
 #define number_of_watchers 2
 
-enum play_status_type {
+typedef enum {
   PS_NOT_AVAILABLE = 0,
   PS_STOPPED,
   PS_PAUSED,
   PS_PLAYING,
 } play_status_type;
 
-enum active_state_type {
+typedef enum {
   AM_INACTIVE = 0,
   AM_ACTIVE,
 } active_state_type;
 
-enum shuffle_status_type {
+typedef enum {
   SS_NOT_AVAILABLE = 0,
   SS_OFF,
   SS_ON,
 } shuffle_status_type;
 
-enum repeat_status_type {
+typedef enum {
   RS_NOT_AVAILABLE = 0,
   RS_OFF,
   RS_ONE,
@@ -59,9 +59,9 @@ typedef struct metadata_bundle {
   // used detect transitions between server activity being on or off
   // e.g. to reease metadata when a server goes inactive, but not if it's permanently
   // inactive.
-  enum play_status_type play_status;
-  enum shuffle_status_type shuffle_status;
-  enum repeat_status_type repeat_status;
+  play_status_type play_status;
+  shuffle_status_type shuffle_status;
+  repeat_status_type repeat_status;
 
   // the following pertain to the track playing
 
@@ -123,9 +123,9 @@ typedef struct metadata_bundle {
 
   // end
 
-  enum play_status_type
+  play_status_type
       player_state; // this is the state of the actual player itself, which can be a bit noisy.
-  enum active_state_type active_state;
+  active_state_type active_state;
 
   int speaker_volume; // this is the actual speaker volume, allowing for the main volume and the
                       // speaker volume control
@@ -136,7 +136,7 @@ typedef struct metadata_bundle {
 
 } metadata_bundle;
 
-struct metadata_bundle metadata_store;
+extern struct metadata_bundle metadata_store;
 
 void add_metadata_watcher(metadata_watcher fn, void *userdata);
 
index 168ce396dc769ac9ec1e369967d5e9c24f6e1440..76a04c763b3c1e273d4b104eea035ccd9c4fc177 100644 (file)
@@ -39,6 +39,9 @@
 #include "metadata_hub.h"
 #include "mpris-service.h"
 
+MediaPlayer2 *mprisPlayerSkeleton;
+MediaPlayer2Player *mprisPlayerPlayerSkeleton;
+
 double airplay_volume_to_mpris_volume(double sp) {
   if (sp < -30.0)
     sp = -30.0;
index f290d79c0bbc1b3aa1e19b0adfe9c5b198b4056e..160e55d4d9e79ba2e01fd25ea98d5c191fed7856 100644 (file)
@@ -4,8 +4,8 @@
 
 #include "mpris-interface.h"
 
-MediaPlayer2 *mprisPlayerSkeleton;
-MediaPlayer2Player *mprisPlayerPlayerSkeleton;
+extern MediaPlayer2 *mprisPlayerSkeleton;
+extern MediaPlayer2Player *mprisPlayerPlayerSkeleton;
 
 int start_mpris_service();