blob: 505b7c890bc10026275f25aa1b7515495657599f [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
17diff --git a/server/red-channel.c b/server/red-channel.c
18index 1b38f04d..11dc667b 100644
19--- a/server/red-channel.c
20+++ b/server/red-channel.c
21@@ -192,7 +192,7 @@ red_channel_constructed(GObject *object)
22 {
23 RedChannel *self = RED_CHANNEL(object);
24
25- red_channel_debug(self, "thread_id 0x%lx", self->priv->thread_id);
26+ red_channel_debug(self, "thread_id 0x%lx", (unsigned long)self->priv->thread_id);
27
28 RedChannelClass *klass = RED_CHANNEL_GET_CLASS(self);
29
30@@ -475,7 +475,8 @@ void red_channel_remove_client(RedChannel *channel, RedChannelClient *rcc)
31 red_channel_warning(channel, "channel->thread_id (0x%lx) != pthread_self (0x%lx)."
32 "If one of the threads is != io-thread && != vcpu-thread, "
33 "this might be a BUG",
34- channel->priv->thread_id, pthread_self());
35+ (unsigned long)channel->priv->thread_id,
36+ (unsigned long)pthread_self());
37 }
38 spice_return_if_fail(channel);
39 link = g_list_find(channel->priv->clients, rcc);
40diff --git a/server/red-client.c b/server/red-client.c
41index ddfc5400..76986640 100644
42--- a/server/red-client.c
43+++ b/server/red-client.c
44@@ -180,7 +180,7 @@ void red_client_migrate(RedClient *client)
45 spice_warning("client->thread_id (0x%lx) != pthread_self (0x%lx)."
46 "If one of the threads is != io-thread && != vcpu-thread,"
47 " this might be a BUG",
48- client->thread_id, pthread_self());
49+ (unsigned long)client->thread_id, (unsigned long)pthread_self());
50 }
51 FOREACH_CHANNEL_CLIENT(client, rcc) {
52 if (red_channel_client_is_connected(rcc)) {
53@@ -199,8 +199,8 @@ void red_client_destroy(RedClient *client)
54 spice_warning("client->thread_id (0x%lx) != pthread_self (0x%lx)."
55 "If one of the threads is != io-thread && != vcpu-thread,"
56 " this might be a BUG",
57- client->thread_id,
58- pthread_self());
59+ (unsigned long)client->thread_id,
60+ (unsigned long)pthread_self());
61 }
62 red_client_set_disconnecting(client);
63 FOREACH_CHANNEL_CLIENT(client, rcc) {
64--
652.17.1
66