[Spice-commits] src/channel-usbredir.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 6 08:09:25 UTC 2019


 src/channel-usbredir.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 2907ee26d7104221d230ee3bea03dc6a38de58c3
Author: Victor Toso <me at victortoso.com>
Date:   Sat May 4 12:02:06 2019 +0000

    channel-usbredir: if disabled, define type without private
    
    Otherwise we'll get
    
        g_type_add_instance_private: assertion 'private_size > 0' failed
    
    Signed-off-by: Victor Toso <victortoso at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
index 3562164..f801c8e 100644
--- a/src/channel-usbredir.c
+++ b/src/channel-usbredir.c
@@ -101,12 +101,11 @@ static void usbredir_lock_lock(void *user_data);
 static void usbredir_unlock_lock(void *user_data);
 static void usbredir_free_lock(void *user_data);
 
+G_DEFINE_TYPE_WITH_PRIVATE(SpiceUsbredirChannel, spice_usbredir_channel, SPICE_TYPE_CHANNEL)
 #else
-struct _SpiceUsbredirChannelPrivate {
-};
+G_DEFINE_TYPE(SpiceUsbredirChannel, spice_usbredir_channel, SPICE_TYPE_CHANNEL)
 #endif
 
-G_DEFINE_TYPE_WITH_PRIVATE(SpiceUsbredirChannel, spice_usbredir_channel, SPICE_TYPE_CHANNEL)
 
 /* ------------------------------------------------------------------ */
 


More information about the Spice-commits mailing list