diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2015-09-24 12:55:01 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2015-10-26 10:19:53 +0100 |
commit | f7a199b2b4486242271f769bb4bc2638c0413274 (patch) | |
tree | f63f2b1bc536e1064cabbdf12f0c406f85560643 /contrib/ivshmem-client/main.c | |
parent | 660c97eef6f8f416c5dc24d3798e29f9f9f698fb (diff) | |
download | qemu-f7a199b2b4486242271f769bb4bc2638c0413274.zip qemu-f7a199b2b4486242271f769bb4bc2638c0413274.tar.gz qemu-f7a199b2b4486242271f769bb4bc2638c0413274.tar.bz2 |
ivshmem: use little-endian int64_t for the protocol
The current ivshmem protocol uses 'long' for integers. But the
sizeof(long) depends on the host and the endianess is not defined, which
may cause portability troubles.
Instead, switch to using little-endian int64_t. This breaks the
protocol, except on x64 little-endian host where this change
should be compatible.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Claudio Fontana <claudio.fontana@huawei.com>
Diffstat (limited to 'contrib/ivshmem-client/main.c')
-rw-r--r-- | contrib/ivshmem-client/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/ivshmem-client/main.c b/contrib/ivshmem-client/main.c index 28dd81e..c004870 100644 --- a/contrib/ivshmem-client/main.c +++ b/contrib/ivshmem-client/main.c @@ -179,7 +179,8 @@ ivshmem_client_notification_cb(const IvshmemClient *client, { (void)client; (void)arg; - printf("receive notification from peer_id=%ld vector=%d\n", peer->id, vect); + printf("receive notification from peer_id=%" PRId64 " vector=%u\n", + peer->id, vect); } int |