$OpenBSD: patch-libi3_ipc_recv_message_c,v 1.2 2013/07/01 13:42:25 dcoppa Exp $

commit cecadbfdfe01b770e8a7832e94e0ca58073a03f9
Author: Michael Stapelberg <michael@stapelberg.de>
Date:   Sat Jun 29 19:28:13 2013 +0200

Bugfix: fix bus error on OpenBSD/sparc64 (Thanks tobiasu)

fixes #1034

--- libi3/ipc_recv_message.c.orig	Mon Jun 24 21:38:29 2013
+++ libi3/ipc_recv_message.c	Mon Jun 24 21:41:22 2013
@@ -54,10 +54,10 @@ int ipc_recv_message(int sockfd, uint32_t *message_typ
     }
 
     walk += strlen(I3_IPC_MAGIC);
-    *reply_length = *((uint32_t*)walk);
+    memcpy(reply_length, walk, sizeof(uint32_t));
     walk += sizeof(uint32_t);
     if (message_type != NULL)
-        *message_type = *((uint32_t*)walk);
+        memcpy(message_type, walk, sizeof(uint32_t));
 
     *reply = smalloc(*reply_length);
 
