Blame SOURCES/0014-fix-another-aliasing-problem.patch

a66d21
From dfb8fb325b5a3b28c08e3699575441d437ec1863 Mon Sep 17 00:00:00 2001
a66d21
Author: Paolo Bonzini <pbonzini@redhat.com>
a66d21
Date:   Fri Aug 2 14:07:42 2013 +0200
a66d21
Subject: [RHEL7 libiscsi PATCH 14/18] fix another aliasing problem
a66d21
a66d21
scsi_set_uint64 should just use scsi_set_uint32, similar to
a66d21
what scsi_get_uint64 does.  This avoids problems on architectures
a66d21
where "uint32_t" requires more alignment than "char", e.g. ARM.
a66d21
a66d21
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
a66d21
(cherry-picked from upstream commit 31a3aeb0e0167401a7c10f4cba95a72697f907c0)
a66d21
a66d21
diff --git a/lib/scsi-lowlevel.c b/lib/scsi-lowlevel.c
a66d21
index 0989f0f..1bb03af 100644
a66d21
--- a/lib/scsi-lowlevel.c
a66d21
+++ b/lib/scsi-lowlevel.c
a66d21
@@ -300,11 +300,11 @@ scsi_set_uint64(unsigned char *c, uint64_t v)
a66d21
 	uint32_t val;
a66d21
 
a66d21
 	val = (v >> 32) & 0xffffffff;
a66d21
-	*(uint32_t *)c = htonl(val);
a66d21
+	scsi_set_uint32(c, val);
a66d21
 
a66d21
 	c += 4;
a66d21
 	val = v & 0xffffffff;
a66d21
-	*(uint32_t *)c = htonl(val);
a66d21
+	scsi_set_uint32(c, val);
a66d21
 }
a66d21
 
a66d21
 inline void