summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorHongzhi.Song <hongzhi.song@windriver.com>2019-06-13 16:29:34 +0000
committerKhem Raj <raj.khem@gmail.com>2019-06-15 16:45:32 -0700
commitb47aae2d61e15ef4321e96487e3a2f83c115e9b3 (patch)
treea4437d001545571c2f6f571deeb88403a85bb62e /meta-networking
parent26a390305c827b038c942d3faf8b2ba32c847e5a (diff)
downloadmeta-openembedded-b47aae2d61e15ef4321e96487e3a2f83c115e9b3.tar.gz
spice: fix compile errors on 32bit system
There are folowing compile errors on Linux 32bit system: red-channel.c:207:73: error: format '%x' expects argument of type 'unsigned int', but argument 7 has type 'long unsigned int' [-Werror=format=] |207| red_channel_debug(self, "thread_id 0x%" G_GSIZE_MODIFIER "x", ~~~~~~~~~~~~~~~~~~~~~^ self->priv->thread_id); ~~~~~~~~~~~~~~~~~~~~~^ On 32bit system, #define G_GSIZE_MODIFIER "". But the type of 'self->priv->thread_id' is 'unsigned long int' which should match '%lx' not '%x'. So we should recovery the <0x%" G_GSIZE_MODIFIER "x"> to <0x%lx">. And others files modification are similar to G_GSIZE_MODIFIER. Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-support/spice/spice/0001-Fix-compile-errors-on-Linux-32bit-system.patch96
-rw-r--r--meta-networking/recipes-support/spice/spice_git.bb1
2 files changed, 97 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/spice/spice/0001-Fix-compile-errors-on-Linux-32bit-system.patch b/meta-networking/recipes-support/spice/spice/0001-Fix-compile-errors-on-Linux-32bit-system.patch
new file mode 100644
index 000000000..d04bee95f
--- /dev/null
+++ b/meta-networking/recipes-support/spice/spice/0001-Fix-compile-errors-on-Linux-32bit-system.patch
@@ -0,0 +1,96 @@
1From a2af005b5d4a62839e56f42a43df793356e78f58 Mon Sep 17 00:00:00 2001
2From: "Hongzhi.Song" <hongzhi.song@windriver.com>
3Date: Tue, 4 Jun 2019 03:58:17 -0400
4Subject: [PATCH] Fix compile errors on Linux 32bit system
5
6There are folowing compile errors on Linux 32bit system:
7
8red-channel.c:207:73: error: format '%x' expects argument of type
9'unsigned int', but argument 7 has type 'long unsigned int' [-Werror=format=]
10|207| red_channel_debug(self, "thread_id 0x%" G_GSIZE_MODIFIER "x",
11 ~~~~~~~~~~~~~~~~~~~~~^
12 self->priv->thread_id);
13 ~~~~~~~~~~~~~~~~~~~~~^
14
15On 32bit system, #define G_GSIZE_MODIFIER "". But the type of
16'self->priv->thread_id' is 'unsigned long int' which should match '%lx'
17not '%x'.
18
19So we should recovery the <0x%" G_GSIZE_MODIFIER "x"> to <0x%lx">.
20And others files modification are similar to G_GSIZE_MODIFIER.
21
22Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com>
23---
24Upstream-Status: Submitted [https://lists.freedesktop.org/archives/spice-devel/2019-June/049285.html]
25
26 server/red-channel.c | 6 +++---
27 server/red-client.c | 8 ++++----
28 server/red-replay-qxl.c | 2 +-
29 3 files changed, 8 insertions(+), 8 deletions(-)
30
31diff --git a/server/red-channel.c b/server/red-channel.c
32index f81142d..6a03ec2 100644
33--- a/server/red-channel.c
34+++ b/server/red-channel.c
35@@ -202,7 +202,7 @@ red_channel_constructed(GObject *object)
36 {
37 RedChannel *self = RED_CHANNEL(object);
38
39- red_channel_debug(self, "thread_id 0x%" G_GSIZE_MODIFIER "x", (unsigned long)self->priv->thread_id);
40+ red_channel_debug(self, "thread_id 0x%lx", (unsigned long)self->priv->thread_id);
41
42 RedChannelClass *klass = RED_CHANNEL_GET_CLASS(self);
43
44@@ -473,8 +473,8 @@ void red_channel_remove_client(RedChannel *channel, RedChannelClient *rcc)
45
46 if (!pthread_equal(pthread_self(), channel->priv->thread_id)) {
47 red_channel_warning(channel,
48- "channel->thread_id (0x%" G_GSIZE_MODIFIER "x) != "
49- "pthread_self (0x%" G_GSIZE_MODIFIER "x)."
50+ "channel->thread_id (0x%lx) != "
51+ "pthread_self (0x%lx)."
52 "If one of the threads is != io-thread && != vcpu-thread, "
53 "this might be a BUG",
54 (unsigned long)channel->priv->thread_id,
55diff --git a/server/red-client.c b/server/red-client.c
56index 2b859cb..ff4da2a 100644
57--- a/server/red-client.c
58+++ b/server/red-client.c
59@@ -174,8 +174,8 @@ void red_client_migrate(RedClient *client)
60 RedChannel *channel;
61
62 if (!pthread_equal(pthread_self(), client->thread_id)) {
63- spice_warning("client->thread_id (0x%" G_GSIZE_MODIFIER "x) != "
64- "pthread_self (0x%" G_GSIZE_MODIFIER "x)."
65+ spice_warning("client->thread_id (0x%lx) != "
66+ "pthread_self (0x%lx)."
67 "If one of the threads is != io-thread && != vcpu-thread,"
68 " this might be a BUG",
69 (unsigned long)client->thread_id, (unsigned long)pthread_self());
70@@ -193,8 +193,8 @@ void red_client_destroy(RedClient *client)
71 RedChannelClient *rcc;
72
73 if (!pthread_equal(pthread_self(), client->thread_id)) {
74- spice_warning("client->thread_id (0x%" G_GSIZE_MODIFIER "x) != "
75- "pthread_self (0x%" G_GSIZE_MODIFIER "x)."
76+ spice_warning("client->thread_id (0x%lx) != "
77+ "pthread_self (0x%lx)."
78 "If one of the threads is != io-thread && != vcpu-thread,"
79 " this might be a BUG",
80 (unsigned long)client->thread_id,
81diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c
82index 6d34818..0deb406 100644
83--- a/server/red-replay-qxl.c
84+++ b/server/red-replay-qxl.c
85@@ -264,7 +264,7 @@ static replay_t read_binary(SpiceReplay *replay, const char *prefix, size_t *siz
86 exit(1);
87 }
88 if ((ret = inflate(&strm, Z_NO_FLUSH)) != Z_STREAM_END) {
89- spice_error("inflate error %d (disc: %" G_GSSIZE_FORMAT ")",
90+ spice_error("inflate error %d (disc: %li)",
91 ret, *size - strm.total_out);
92 if (ret == Z_DATA_ERROR) {
93 /* last operation may be wrong. since we do the recording
94--
952.8.1
96
diff --git a/meta-networking/recipes-support/spice/spice_git.bb b/meta-networking/recipes-support/spice/spice_git.bb
index 6249b0422..3c45d1f5e 100644
--- a/meta-networking/recipes-support/spice/spice_git.bb
+++ b/meta-networking/recipes-support/spice/spice_git.bb
@@ -24,6 +24,7 @@ SRC_URI = " \
24 git://anongit.freedesktop.org/spice/spice;name=spice \ 24 git://anongit.freedesktop.org/spice/spice;name=spice \
25 git://anongit.freedesktop.org/spice/spice-common;destsuffix=git/subprojects/spice-common;name=spice-common \ 25 git://anongit.freedesktop.org/spice/spice-common;destsuffix=git/subprojects/spice-common;name=spice-common \
26 file://0001-Convert-pthread_t-to-be-numeric.patch \ 26 file://0001-Convert-pthread_t-to-be-numeric.patch \
27 file://0001-Fix-compile-errors-on-Linux-32bit-system.patch \
27" 28"
28 29
29S = "${WORKDIR}/git" 30S = "${WORKDIR}/git"