All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dbus: Fix compile error for 32-bit platforms
@ 2016-03-29 22:36 Mat Martineau
  2016-03-30 15:48 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Mat Martineau @ 2016-03-29 22:36 UTC (permalink / raw)
  To: ell

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

Error encountered with 32-bit gcc 5.3.1:

ell/dbus-kernel.c:412:20: error: cast from pointer to integer of
different size [-Werror=pointer-to-int-cast]

Casting the pointer to uintptr_t instead of uint64_t works on both
32-bit and 64-bit platforms.
---
 ell/dbus-kernel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ell/dbus-kernel.c b/ell/dbus-kernel.c
index 7124c33..863e8e7 100644
--- a/ell/dbus-kernel.c
+++ b/ell/dbus-kernel.c
@@ -409,7 +409,7 @@ int _dbus_kernel_send(int fd, size_t bloom_size, uint8_t bloom_n_hash,
 
 	memset(&cmd, 0, sizeof(cmd));
 	cmd.size = sizeof(cmd);
-	cmd.msg_address = (uint64_t) kmsg;
+	cmd.msg_address = (uintptr_t) kmsg;
 
 	ret = ioctl(fd, KDBUS_CMD_SEND, &cmd);
 	if (ret < 0)
-- 
2.8.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-03-30 15:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-29 22:36 [PATCH] dbus: Fix compile error for 32-bit platforms Mat Martineau
2016-03-30 15:48 ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.