From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSsZQ-0005en-80 for qemu-devel@nongnu.org; Wed, 26 Mar 2014 14:29:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSsZL-0001QD-KI for qemu-devel@nongnu.org; Wed, 26 Mar 2014 14:29:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37150) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSsZL-0001PD-C0 for qemu-devel@nongnu.org; Wed, 26 Mar 2014 14:28:55 -0400 From: Tomoki Sekiyama Date: Wed, 26 Mar 2014 14:28:51 -0400 Message-ID: <20140326182851.11210.44535.stgit@hds.com> In-Reply-To: <20140326182838.11210.32245.stgit@hds.com> References: <20140326182838.11210.32245.stgit@hds.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 2/2] vss-win32: Fix build with mingw64-headers-3.1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, famz@redhat.com, mdroth@linux.vnet.ibm.com, mitsuhiro.tanino@hds.com In mingw64-headers-3.1.0, definition of _com_issue_error() is added, which conflicts with definition in install.cpp. This adds version checking for mingw headers to disable the definition when the headers>=3.1 is used. Signed-off-by: Tomoki Sekiyama --- qga/vss-win32/install.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qga/vss-win32/install.cpp b/qga/vss-win32/install.cpp index b791a6c..b0e4426 100644 --- a/qga/vss-win32/install.cpp +++ b/qga/vss-win32/install.cpp @@ -75,10 +75,13 @@ static void errmsg_dialog(DWORD err, const char *text, const char *opt = "") #define chk(status) _chk(hr, status, "Failed to " #status, out) +#if !defined(__MINGW64_VERSION_MAJOR) || !defined(__MINGW64_VERSION_MINOR) || \ + __MINGW64_VERSION_MAJOR * 100 + __MINGW64_VERSION_MINOR < 301 void __stdcall _com_issue_error(HRESULT hr) { errmsg(hr, "Unexpected error in COM"); } +#endif template HRESULT put_Value(ICatalogObject *pObj, LPCWSTR name, T val)