libibmad: fix for umad unaligned access of ia64.

Signed-off-by: Ron Livne <ronli@voltaire.com>


diff -Naurp libibmad-1.1.6.orig/src/fields.c libibmad-1.1.6/src/fields.c
--- libibmad-1.1.6.orig/src/fields.c	2008-02-28 10:58:36.000000000 +0200
+++ libibmad-1.1.6/src/fields.c	2008-06-01 21:44:04.000000000 +0300
@@ -366,14 +366,15 @@ ib_field_t ib_mad_f [] = {
 void
 _set_field64(void *buf, int base_offs, ib_field_t *f, uint64_t val)
 {
-	*(uint64_t *)((char *)buf + base_offs + f->bitoffs / 8) = htonll(val);
+	memcpy((char *)buf + base_offs + f->bitoffs / 8, &val, sizeof(uint64_t));
 }
 
 uint64_t
 _get_field64(void *buf, int base_offs, ib_field_t *f)
 {
-	uint64_t val = *(uint64_t *)((char *)buf + base_offs + f->bitoffs / 8);
-	return ntohll(val);
+	uint64_t val;
+        memcpy(&val, ((char *)buf + base_offs + f->bitoffs / 8), sizeof(uint64_t));
+        return ntohll(val);
 }
 
 void
