Patchwork [1/8] bswap: fix compiler warning

login
register
mail settings
Submitter Stefan Hajnoczi
Date April 19, 2013, 11:33 a.m.
Message ID <1366371241-23430-2-git-send-email-stefanha@redhat.com>
Download mbox | patch
Permalink /patch/237918/
State New
Headers show

Comments

Stefan Hajnoczi - April 19, 2013, 11:33 a.m.
From: Alexey Kardashevskiy <aik@ozlabs.ru>

The bswap functions use memcpy but the bswap.h header itself does not seem to
include it in some configuration such as cross compiling for powerpc64
on x86_64 machine.

The patch explicitly includes string.h.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 include/qemu/bswap.h | 1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index d3af35d..14a5f65 100644
--- a/include/qemu/bswap.h
+++ b/include/qemu/bswap.h
@@ -4,6 +4,7 @@ 
 #include "config-host.h"
 #include <inttypes.h>
 #include <limits.h>
+#include <string.h>
 #include "fpu/softfloat.h"
 
 #ifdef CONFIG_MACHINE_BSWAP_H