From patchwork Thu Feb 25 01:01:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 587817 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 906E914076B for ; Thu, 25 Feb 2016 12:01:58 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Gckp0ZG+; dkim-atps=neutral Received: from localhost ([::1]:39337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYkJY-0000Zp-EC for incoming@patchwork.ozlabs.org; Wed, 24 Feb 2016 20:01:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYkJK-0000Ht-0R for qemu-devel@nongnu.org; Wed, 24 Feb 2016 20:01:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYkJG-0003Eq-OV for qemu-devel@nongnu.org; Wed, 24 Feb 2016 20:01:41 -0500 Received: from mail-oi0-x232.google.com ([2607:f8b0:4003:c06::232]:34640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYkJG-0003EN-If for qemu-devel@nongnu.org; Wed, 24 Feb 2016 20:01:38 -0500 Received: by mail-oi0-x232.google.com with SMTP id m82so29677899oif.1 for ; Wed, 24 Feb 2016 17:01:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=I1Y2VSSD8boSIvJPXMZ59lLHl5VEZ3/tI4D7Xt6LbcE=; b=Gckp0ZG+or3O2OdVrRn7LVsxusAC643j5Jnqi7a3jthM1vY5aV9nqwpE1gWhEhBqaK 4OxDCZvX46NR2MvCl/9KYXHSx1h4UeL+SSbTwqYYNYL+QQlt0tpPde7TXLqUZrtqvHcf pFgm3aGD3zDqyxJG7mjCils6/8TIKFv/1aCi+W/05En8gb6sZEA/hz/FvxVe9pedKzfm DyGeKwU6qZ4gAG/JvW7mGu3ZydKE9rSF4BMGayF6BVRIuc3k02Dcx1U8kcZOgSF3W767 CKAoBFqoCKARz6jht9igm9Q6lOaV75TsZukueSODGbhYdZw0QSD/NlysDyi+9FCQne5l OKMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=I1Y2VSSD8boSIvJPXMZ59lLHl5VEZ3/tI4D7Xt6LbcE=; b=UQH3Vs5B2MqfZOalNkMXI8bi8FkvAFVWLw+qDARCdY6zhpz/2lNpHhn+u1jgg7gf+u sZvD8SvQBn0m5HIy6CQ6mvqqU0pr2G2B88Asi/Kj0iEUjy/oWqSpq8XHax+C/r9syq+F iq9jNi8j8QEt+vtxELMBaGcWKCStiTRGmRH+3yeU0s4OrSP5wOGJHwHfUESacumVx+/k gESvMzGygsiVI4xd0/SgV1EqcJLXL0x9cZEeV0u/a+9XzhXBEr2MEQymd1PtMAbbs9zy 8x1kzuKydyLzB7c3Ymg9upWOsfT7Apoejye646pDRVVzXI4nq+rBpd5ACGSjP+O3/9x7 1uwA== X-Gm-Message-State: AG10YOStiBQefkNbuh+6FVxntQQpzouI9QV7oYyA2GVpaDUMeYqIkGkURWXHMMesZ2hUgA== X-Received: by 10.202.105.65 with SMTP id e62mr32884659oic.79.1456362097688; Wed, 24 Feb 2016 17:01:37 -0800 (PST) Received: from localhost (104-184-96-177.lightspeed.austtx.sbcglobal.net. [104.184.96.177]) by smtp.gmail.com with ESMTPSA id ur2sm3650571obc.11.2016.02.24.17.01.35 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 24 Feb 2016 17:01:36 -0800 (PST) From: Michael Roth To: qemu-devel@nongnu.org Date: Wed, 24 Feb 2016 19:01:09 -0600 Message-Id: <1456362069-13087-1-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::232 Cc: Peter Maydell , Michael Roth Subject: [Qemu-devel] [PATCH] qga: fix w32 breakage due to missing osdep.h includes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org requester.h relied on qemu/compiler.h definitions to handle GCC_FMT_ATTR() stub, but this include was removed as part of scripted clean-ups via 30456d5: all: Clean up includes under the assumption that all C files would have included it via qemu/osdep.h at that point. requester.cpp was likely missed due to C++ files requiring manual/special handling as well as VSS build options needing to be enabled to trigger build failures. Fix this by including qemu/osdep.h. That in turn pulls in a macro from qapi/error.h that conflicts with a struct field name in requester.h, so fix that as well by renaming the field. While we're at it, fix up provider.cpp/install.cpp to include osdep.h as well. Cc: Peter Maydell Signed-off-by: Michael Roth Reviewed-by: Eric Blake --- qga/vss-win32.c | 2 +- qga/vss-win32/install.cpp | 3 +-- qga/vss-win32/provider.cpp | 2 +- qga/vss-win32/requester.cpp | 8 ++++---- qga/vss-win32/requester.h | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/qga/vss-win32.c b/qga/vss-win32.c index 5182e3b..9a0e463 100644 --- a/qga/vss-win32.c +++ b/qga/vss-win32.c @@ -150,7 +150,7 @@ void qga_vss_fsfreeze(int *nr_volume, Error **errp, bool freeze) const char *func_name = freeze ? "requester_freeze" : "requester_thaw"; QGAVSSRequesterFunc func; ErrorSet errset = { - .error_setg_win32 = error_setg_win32_internal, + .error_setg_win32_wrapper = error_setg_win32_internal, .errp = errp, }; diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp index b0e4426..cd9cdb4 100644 --- a/qga/vss-win32/install.cpp +++ b/qga/vss-win32/install.cpp @@ -10,8 +10,7 @@ * See the COPYING file in the top-level directory. */ -#include -#include +#include "qemu/osdep.h" #include "vss-common.h" #include "inc/win2003/vscoordint.h" diff --git a/qga/vss-win32/provider.cpp b/qga/vss-win32/provider.cpp index d5129f8..d977393 100644 --- a/qga/vss-win32/provider.cpp +++ b/qga/vss-win32/provider.cpp @@ -10,7 +10,7 @@ * See the COPYING file in the top-level directory. */ -#include +#include "qemu/osdep.h" #include "vss-common.h" #include "inc/win2003/vscoordint.h" #include "inc/win2003/vsprov.h" diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp index 9b3e310..b57d517 100644 --- a/qga/vss-win32/requester.cpp +++ b/qga/vss-win32/requester.cpp @@ -10,7 +10,7 @@ * See the COPYING file in the top-level directory. */ -#include +#include "qemu/osdep.h" #include "vss-common.h" #include "requester.h" #include "assert.h" @@ -23,9 +23,9 @@ /* Call QueryStatus every 10 ms while waiting for frozen event */ #define VSS_TIMEOUT_EVENT_MSEC 10 -#define err_set(e, err, fmt, ...) \ - ((e)->error_setg_win32((e)->errp, __FILE__, __LINE__, __func__, \ - err, fmt, ## __VA_ARGS__)) +#define err_set(e, err, fmt, ...) \ + ((e)->error_setg_win32_wrapper((e)->errp, __FILE__, __LINE__, __func__, \ + err, fmt, ## __VA_ARGS__)) /* Bad idea, works only when (e)->errp != NULL: */ #define err_is_set(e) ((e)->errp && *(e)->errp) /* To lift this restriction, error_propagate(), like we do in QEMU code */ diff --git a/qga/vss-win32/requester.h b/qga/vss-win32/requester.h index ad2bf3d..2a39d73 100644 --- a/qga/vss-win32/requester.h +++ b/qga/vss-win32/requester.h @@ -27,7 +27,7 @@ typedef void (*ErrorSetFunc)(struct Error **errp, int win32_err, const char *fmt, ...) GCC_FMT_ATTR(6, 7); typedef struct ErrorSet { - ErrorSetFunc error_setg_win32; + ErrorSetFunc error_setg_win32_wrapper; struct Error **errp; /* restriction: must not be null */ } ErrorSet;