[spice-gtk 1/2] channel-usbredir: if disabled, define type without private

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Victor Toso <me@xxxxxxxxxxxxxx>

Otherwise we'll get

    g_type_add_instance_private: assertion 'private_size > 0' failed

Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
---
 src/channel-usbredir.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

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)
 
 /* ------------------------------------------------------------------ */
 
-- 
2.20.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]