Skip to content

Commit

Permalink
migration: Fix compilation with older compilers
Browse files Browse the repository at this point in the history
That typedefs are needed on both files.  New compilers (F25 where I
work) don't complain about repeating a typedef.  But older ones
complain.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
  • Loading branch information
Juan Quintela committed Jun 14, 2017
1 parent 3f06029 commit 68a4a2f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions include/migration/register.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
#ifndef MIGRATION_REGISTER_H
#define MIGRATION_REGISTER_H

typedef void SaveStateHandler(QEMUFile *f, void *opaque);
typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);

typedef struct SaveVMHandlers {
/* This runs inside the iothread lock. */
SaveStateHandler *save_state;
Expand Down
1 change: 0 additions & 1 deletion include/migration/vmstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

#include "migration/qjson.h"

typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
typedef struct VMStateInfo VMStateInfo;
typedef struct VMStateDescription VMStateDescription;
typedef struct VMStateField VMStateField;
Expand Down
2 changes: 2 additions & 0 deletions include/qemu/typedefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,7 @@ typedef struct uWireSlave uWireSlave;
typedef struct VirtIODevice VirtIODevice;
typedef struct Visitor Visitor;
typedef struct node_info NodeInfo;
typedef void SaveStateHandler(QEMUFile *f, void *opaque);
typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);

#endif /* QEMU_TYPEDEFS_H */

0 comments on commit 68a4a2f

Please sign in to comment.