blob: e63cbe3b72628befd2712b4245d41c98b7d4bc86 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 0726ce6d6f52e135e28f15ca8392568c84909b1d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 16 Jun 2018 16:21:39 -0700
4Subject: [PATCH] Convert pthread_t to be numeric
5
6typecast pthread_t to unsigned long
7pthread_t is implemented as a struct point in musl and its as per standard
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11Upstream-Status: Pending
12
13 server/red-channel.c | 5 +++--
14 server/red-client.c | 6 +++---
15 2 files changed, 6 insertions(+), 5 deletions(-)
16
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080017--- a/server/red-channel.c
18+++ b/server/red-channel.c
Brad Bishop15ae2502019-06-18 21:44:24 -040019@@ -204,7 +204,7 @@ red_channel_constructed(GObject *object)
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080020 {
21 RedChannel *self = RED_CHANNEL(object);
22
Brad Bishop15ae2502019-06-18 21:44:24 -040023- red_channel_debug(self, "thread_id 0x%" G_GSIZE_MODIFIER "x", self->priv->thread_id);
24+ red_channel_debug(self, "thread_id 0x%" G_GSIZE_MODIFIER "x", (unsigned long)self->priv->thread_id);
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080025
26 RedChannelClass *klass = RED_CHANNEL_GET_CLASS(self);
27
Brad Bishop15ae2502019-06-18 21:44:24 -040028@@ -479,7 +479,8 @@ void red_channel_remove_client(RedChanne
29 "pthread_self (0x%" G_GSIZE_MODIFIER "x)."
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080030 "If one of the threads is != io-thread && != vcpu-thread, "
31 "this might be a BUG",
32- channel->priv->thread_id, pthread_self());
33+ (unsigned long)channel->priv->thread_id,
34+ (unsigned long)pthread_self());
35 }
36 spice_return_if_fail(channel);
37 link = g_list_find(channel->priv->clients, rcc);
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080038--- a/server/red-client.c
39+++ b/server/red-client.c
Brad Bishop15ae2502019-06-18 21:44:24 -040040@@ -180,7 +180,7 @@ void red_client_migrate(RedClient *clien
41 "pthread_self (0x%" G_GSIZE_MODIFIER "x)."
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080042 "If one of the threads is != io-thread && != vcpu-thread,"
43 " this might be a BUG",
44- client->thread_id, pthread_self());
45+ (unsigned long)client->thread_id, (unsigned long)pthread_self());
46 }
47 FOREACH_CHANNEL_CLIENT(client, rcc) {
48 if (red_channel_client_is_connected(rcc)) {
Brad Bishop15ae2502019-06-18 21:44:24 -040049@@ -199,8 +199,8 @@ void red_client_destroy(RedClient *clien
50 "pthread_self (0x%" G_GSIZE_MODIFIER "x)."
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080051 "If one of the threads is != io-thread && != vcpu-thread,"
52 " this might be a BUG",
53- client->thread_id,
54- pthread_self());
55+ (unsigned long)client->thread_id,
56+ (unsigned long)pthread_self());
57 }
58 red_client_set_disconnecting(client);
59 FOREACH_CHANNEL_CLIENT(client, rcc) {