Skip to contentSkip to conversation

Fix upstream error: redefinition of typedef 'LoadStateHandler'

PATCH In review Philippe Mathieu-Daudé 2 participants 4 messages Jun 13, 2017 – Jun 14, 2017

lore
Share & tools
lore
#0 lore raw

cover Fix upstream error: redefinition of typedef 'LoadStateHandler'

Also included Fam's patch for bison/flex, not required but still silent few warnings.

patchew output:

=== OUTPUT BEGIN ===
In file included from /tmp/qemu-test/src/hw/net/vmxnet3.c:30:
/tmp/qemu-test/src/include/migration/register.h:18: error: redefinition of typedef ‘LoadStateHandler’ /tmp/qemu-test/src/include/migration/vmstate.h:32: note: previous declaration of ‘LoadStateHandler’ was here
make: *** [hw/net/vmxnet3.o] Error 1
make: *** Waiting for unfinished jobs....
tests/docker/Makefile.include:118: recipe for target 'docker-run' failed
make[1]: *** [docker-run] Error 2
make[1]: Leaving directory '/var/tmp/patchew-tester-tmp-x6sxqrj2/src' tests/docker/Makefile.include:149: recipe for target 'docker-run-test-quick@centos6' failed
make: *** [docker-run-test-quick@centos6] Error 2
=== OUTPUT END ===

Fam Zheng (1):
docker: Add flex and bison to centos6 image

Philippe Mathieu-Daudé (1):
migration: remove duplicate typedef

 include/migration/vmstate.h             | 2 +-
 tests/docker/dockerfiles/centos6.docker | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/2 docker: Add flex and bison to centos6 image

From: Fam Zheng <[email protected]>

Currently there are warnings about flex and bison being missing when building in the centos6 image:

make[1]: flex: Command not found
BISON dtc-parser.tab.c
make[1]: bison: Command not found

Add them.

---
 tests/docker/dockerfiles/centos6.docker | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/docker/dockerfiles/centos6.docker +1 -1
index 34e0d3b91e..17a4d24d54 100644
@@ -1,7 +1,7 @@
 FROM centos:6
 RUN yum install -y epel-release
 ENV PACKAGES libfdt-devel ccache \
-    tar git make gcc g++ \
+    tar git make gcc g++ flex bison \
     zlib-devel glib2-devel SDL-devel pixman-devel \
     epel-release
 RUN yum install -y $PACKAGES
Signature · 1 line
2.11.0
#2 lore raw

PATCH 2/2 migration: remove duplicate typedef

In reply to Philippe Mathieu-Daudé
    $ make docker-run-test-quick@centos6
    In file included from hw/net/vmxnet3.c:30:
    include/migration/register.h:18: error: redefinition of typedef ‘LoadStateHandler’
    include/migration/vmstate.h:32: note: previous declaration of ‘LoadStateHandler’ was here
    make: *** [hw/net/vmxnet3.o] Error 1
    tests/docker/Makefile.include:118: recipe for target 'docker-run' failed
---
 include/migration/vmstate.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/migration/vmstate.h +1 -1
index f3f3c2af4d..342027def8 100644
@@ -28,8 +28,8 @@
 #define QEMU_VMSTATE_H
 
 #include "migration/qjson.h"
+#include "migration/register.h"
 
-typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
 typedef struct VMStateInfo VMStateInfo;
 typedef struct VMStateDescription VMStateDescription;
 typedef struct VMStateField VMStateField;
Signature · 1 line
2.11.0
Reviewed-by on v1 2/2
#3 lore raw

Re: [Qemu-devel] [PATCH 2/2] migration: remove duplicate typedef

Quoted 29 lines · Philippe Mathieu-Daudé
    $ make docker-run-test-quick@centos6
    In file included from hw/net/vmxnet3.c:30:
    include/migration/register.h:18: error: redefinition of typedef ‘LoadStateHandler’
    include/migration/vmstate.h:32: note: previous declaration of ‘LoadStateHandler’ was here
    make: *** [hw/net/vmxnet3.o] Error 1
    tests/docker/Makefile.include:118: recipe for target 'docker-run' failed
---
 include/migration/vmstate.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/migration/vmstate.h +1 -1
index f3f3c2af4d..342027def8 100644
@@ -28,8 +28,8 @@
 #define QEMU_VMSTATE_H
 
 #include "migration/qjson.h"
+#include "migration/register.h"
 
-typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
 typedef struct VMStateInfo VMStateInfo;
 typedef struct VMStateDescription VMStateDescription;
 typedef struct VMStateField VMStateField;
Signature · 1 line
2.11.0

Peter: since this affects patchew results, shall we apply this onto master directly? I can take patch 1 in my tree.

Fam