From nobody Wed Nov 5 15:42:30 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1497441228255390.49876423796104; Wed, 14 Jun 2017 04:53:48 -0700 (PDT) Received: from localhost ([::1]:47972 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL6rp-00015h-1X for importer@patchew.org; Wed, 14 Jun 2017 07:53:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dL6py-0007q5-0R for qemu-devel@nongnu.org; Wed, 14 Jun 2017 07:51:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dL6pv-0000S3-M7 for qemu-devel@nongnu.org; Wed, 14 Jun 2017 07:51:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44084) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dL6pv-0000Rk-FN for qemu-devel@nongnu.org; Wed, 14 Jun 2017 07:51:47 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4B4AB80C0A for ; Wed, 14 Jun 2017 11:51:46 +0000 (UTC) Received: from secure.mitica (ovpn-116-65.ams2.redhat.com [10.36.116.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB9D886F50; Wed, 14 Jun 2017 11:51:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4B4AB80C0A Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=quintela@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4B4AB80C0A From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 14 Jun 2017 13:51:34 +0200 Message-Id: <20170614115138.19571-2-quintela@redhat.com> In-Reply-To: <20170614115138.19571-1-quintela@redhat.com> References: <20170614115138.19571-1-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 14 Jun 2017 11:51:46 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/5] migration: Fix compilation with older compilers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, dgilbert@redhat.com, peterx@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Greg Kurz --- include/migration/register.h | 3 --- include/migration/vmstate.h | 1 - include/qemu/typedefs.h | 2 ++ 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/migration/register.h b/include/migration/register.h index 717c617..d9498d9 100644 --- a/include/migration/register.h +++ b/include/migration/register.h @@ -14,9 +14,6 @@ #ifndef MIGRATION_REGISTER_H #define MIGRATION_REGISTER_H =20 -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; diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index f3f3c2a..e85fbd8 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -29,7 +29,6 @@ =20 #include "migration/qjson.h" =20 -typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id); typedef struct VMStateInfo VMStateInfo; typedef struct VMStateDescription VMStateDescription; typedef struct VMStateField VMStateField; diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 51958bf..f745d5f 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -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); =20 #endif /* QEMU_TYPEDEFS_H */ --=20 2.9.4