From 579cf589ca45e6fd7e15d7c214dfa63b57ae4163 Mon Sep 17 00:00:00 2001 From: Oliver Pinter Date: Sat, 30 Mar 2013 01:06:48 +0100 Subject: [PATCH 1/4] fix this error: In file included from qemu-char.c:59: /usr/include/libutil.h:98:6: error: conflicting types for 'hexdump' void hexdump(const void *_ptr, int _length, const char *_hdr, int _flags); ^ /tmp/qemu/include/qemu-common.h:449:6: note: previous declaration is here void hexdump(const char *buf, FILE *fp, const char *prefix, size_t size); ^ 1 error generated. gmake: *** [qemu-char.o] Error 1 Signed-off-by: Oliver Pinter --- hw/pl330.c | 4 ++-- include/qemu-common.h | 2 +- util/hexdump.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/pl330.c b/hw/pl330.c index 1a04773..ac661eb 100644 --- a/hw/pl330.c +++ b/hw/pl330.c @@ -1158,7 +1158,7 @@ static int pl330_exec_cycle(PL330Chan *channel) if (PL330_ERR_DEBUG > 1) { DB_PRINT("PL330 read from memory @%08x (size = %08x):\n", q->addr, len); - hexdump((char *)buf, stderr, "", len); + qemu_hexdump((char *)buf, stderr, "", len); } fifo_res = pl330_fifo_push(&s->fifo, buf, len, q->tag); if (fifo_res == PL330_FIFO_OK) { @@ -1190,7 +1190,7 @@ static int pl330_exec_cycle(PL330Chan *channel) if (PL330_ERR_DEBUG > 1) { DB_PRINT("PL330 read from memory @%08x (size = %08x):\n", q->addr, len); - hexdump((char *)buf, stderr, "", len); + qemu_hexdump((char *)buf, stderr, "", len); } if (q->inc) { q->addr += len; diff --git a/include/qemu-common.h b/include/qemu-common.h index 31fff22..e3cad8a 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -446,7 +446,7 @@ int uleb128_decode_small(const uint8_t *in, uint32_t *n); * Hexdump a buffer to a file. An optional string prefix is added to every line */ -void hexdump(const char *buf, FILE *fp, const char *prefix, size_t size); +void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size); /* vector definitions */ #ifdef __ALTIVEC__ diff --git a/util/hexdump.c b/util/hexdump.c index 0d0efc8..969b340 100644 --- a/util/hexdump.c +++ b/util/hexdump.c @@ -15,7 +15,7 @@ #include "qemu-common.h" -void hexdump(const char *buf, FILE *fp, const char *prefix, size_t size) +void qemu_hexdump(const char *buf, FILE *fp, const char *prefix, size_t size) { unsigned int b; -- 1.8.2