summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorErlon Cruz <erlon.cruz@br.flextronics.com>2012-08-13 11:15:15 -0300
committerChristophe Fergeau <cfergeau@redhat.com>2015-04-10 20:20:49 +0200
commitd39dfbfef9484eb94f9169770ef949afc4b906b1 (patch)
tree6f54a2d096f1c8506481068d3a85c6e04b67e836 /common
parentba52c4cae204c4fc7104b14ac446d4d5a65a26f8 (diff)
ppc: Fix lz magic endianness
Signed-off-by: Erlon R. Cruz <erlon.cruz@br.flextronics.com> Signed-off-by: Rafael F. Santos <fonsecasantos.rafael@gmail.com> Signed-off-by: Fabiano FidĂȘncio <Fabiano.FidĂȘncio@fit-tecnologia.org.br>
Diffstat (limited to 'common')
-rw-r--r--common/lz.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/lz.c b/common/lz.c
index d1c4033..2350152 100644
--- a/common/lz.c
+++ b/common/lz.c
@@ -47,6 +47,8 @@
#include <config.h>
#endif
+#include <glib.h>
+
#include "spice_common.h"
#include "lz.h"
@@ -537,7 +539,7 @@ int lz_encode(LzContext *lz, LzImageType type, int width, int height, int top_do
encoder->usr->error(encoder->usr, "lz encoder reading image segments failed\n");
}
- encode_32(encoder, LZ_MAGIC);
+ encode_32(encoder, GUINT32_TO_LE(LZ_MAGIC));
encode_32(encoder, LZ_VERSION);
encode_32(encoder, type);
encode_32(encoder, width);