diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2020-04-18 02:03:03 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2020-04-18 02:03:03 +0000 |
commit | 5959188441f553615cc38463766d420730676ad2 (patch) | |
tree | 5d1b7093f4ac78c6714a11045dbc6fb3cf553088 /user/spice-gtk/macro.patch | |
parent | 8c17c8deba851eebc2351dfdc04653e10cec203a (diff) | |
parent | c42df86989c5497cbe8a1898b5d9addc0c861783 (diff) | |
download | packages-5959188441f553615cc38463766d420730676ad2.tar.gz packages-5959188441f553615cc38463766d420730676ad2.tar.bz2 packages-5959188441f553615cc38463766d420730676ad2.tar.xz packages-5959188441f553615cc38463766d420730676ad2.zip |
Merge branch 'fix/spice-gtk' into 'master'
user/spice-gtk: disable USB redirection for now
See merge request adelie/packages!425
Diffstat (limited to 'user/spice-gtk/macro.patch')
-rw-r--r-- | user/spice-gtk/macro.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/user/spice-gtk/macro.patch b/user/spice-gtk/macro.patch new file mode 100644 index 000000000..fc0787b93 --- /dev/null +++ b/user/spice-gtk/macro.patch @@ -0,0 +1,33 @@ +From 7363d1a0a640b6992d5967621e37c3376958d708 Mon Sep 17 00:00:00 2001 +From: Frediano Ziglio <fziglio@redhat.com> +Date: Thu, 19 Mar 2020 15:50:45 +0000 +Subject: [PATCH] channel-main: Avoid macro side effects + +In big endian system GUINT32_TO_LE macro uses the parameter +multiple time causing serial to be incremented multiple times +instead of one. +Avoid side effects using a temporary variable. + +Signed-off-by: Frediano Ziglio <fziglio@redhat.com> +Acked-by: Victor Toso <victortoso@redhat.com> +--- + src/channel-main.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/channel-main.c b/src/channel-main.c +index 0a0b9ca..d7669e8 100644 +--- a/src/channel-main.c ++++ b/src/channel-main.c +@@ -1384,7 +1384,8 @@ static void agent_clipboard_grab(SpiceMainChannel *channel, guint selection, + } + + if (test_agent_cap(channel, VD_AGENT_CAP_CLIPBOARD_GRAB_SERIAL)) { +- *(uint32_t *)grab = GUINT32_TO_LE(c->clipboard_serial[selection]++); ++ uint32_t serial = c->clipboard_serial[selection]++; ++ *(uint32_t *)grab = GUINT32_TO_LE(serial); + grab = (void *)grab + sizeof(uint32_t); + } + +-- +2.24.1 + |