[Spice-devel] [PATCH] Remove duplicate typedef from headers

Frediano Ziglio fziglio at redhat.com
Wed Mar 30 16:33:50 UTC 2016


This is causing compile errors with older gcc versions.

reds.h includes reds-stream.h through red-channel.h so it will get the
RedsState typedef this way.

red-qxl.h includes spice-qxl.h through red-channel.h and then spice.h,
so it will get the QXLState typedef this way.

Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/main-dispatcher.h | 2 +-
 server/red-qxl.h         | 2 --
 server/reds-stream.h     | 3 +--
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/server/main-dispatcher.h b/server/main-dispatcher.h
index ffe82c8..35811d7 100644
--- a/server/main-dispatcher.h
+++ b/server/main-dispatcher.h
@@ -58,6 +58,6 @@ void main_dispatcher_set_mm_time_latency(MainDispatcher *self, RedClient *client
  */
 void main_dispatcher_client_disconnect(MainDispatcher *self, RedClient *client);
 
-MainDispatcher* main_dispatcher_new(RedsState *reds, SpiceCoreInterfaceInternal *core);
+MainDispatcher* main_dispatcher_new(SpiceServer *reds, SpiceCoreInterfaceInternal *core);
 
 #endif //MAIN_DISPATCHER_H
diff --git a/server/red-qxl.h b/server/red-qxl.h
index b1ebbe1..ce80f97 100644
--- a/server/red-qxl.h
+++ b/server/red-qxl.h
@@ -20,8 +20,6 @@
 
 #include "red-channel.h"
 
-typedef struct QXLState QXLState;
-
 typedef struct AsyncCommand AsyncCommand;
 
 void red_qxl_init(SpiceServer *reds, QXLInstance *qxl);
diff --git a/server/reds-stream.h b/server/reds-stream.h
index 1123048..30d23a4 100644
--- a/server/reds-stream.h
+++ b/server/reds-stream.h
@@ -28,7 +28,6 @@
 typedef void (*AsyncReadDone)(void *opaque);
 typedef void (*AsyncReadError)(void *opaque, int err);
 
-typedef struct RedsState RedsState;
 typedef struct RedsStream RedsStream;
 typedef struct RedsStreamPrivate RedsStreamPrivate;
 
@@ -68,7 +67,7 @@ void reds_stream_push_channel_event(RedsStream *s, int event);
 void reds_stream_remove_watch(RedsStream* s);
 void reds_stream_set_channel(RedsStream *stream, int connection_id,
                              int channel_type, int channel_id);
-RedsStream *reds_stream_new(RedsState *reds, int socket);
+RedsStream *reds_stream_new(SpiceServer *reds, int socket);
 bool reds_stream_is_ssl(RedsStream *stream);
 RedsStreamSslStatus reds_stream_ssl_accept(RedsStream *stream);
 int reds_stream_enable_ssl(RedsStream *stream, SSL_CTX *ctx);
-- 
2.5.5



More information about the Spice-devel mailing list