]> Git Repo - qemu.git/commitdiff
qga: fix w32 breakage due to missing osdep.h includes
authorMichael Roth <[email protected]>
Thu, 25 Feb 2016 00:14:52 +0000 (18:14 -0600)
committerMichael Roth <[email protected]>
Thu, 25 Feb 2016 16:54:32 +0000 (10:54 -0600)
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 <[email protected]>
Signed-off-by: Michael Roth <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
qga/vss-win32.c
qga/vss-win32/install.cpp
qga/vss-win32/provider.cpp
qga/vss-win32/requester.cpp
qga/vss-win32/requester.h

index 5182e3be91ef2687f9db085757a7b748ca3c9ea8..9a0e46356ab7d12758c477ef38db81d099276e6b 100644 (file)
@@ -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,
     };
 
index b0e4426c72dd22ed3b89b8d62f36b42caa9c8365..cd9cdb4a24764cb91ed44203fa7c144d5ea02478 100644 (file)
@@ -10,8 +10,7 @@
  * See the COPYING file in the top-level directory.
  */
 
-#include <stdio.h>
-#include <string.h>
+#include "qemu/osdep.h"
 
 #include "vss-common.h"
 #include "inc/win2003/vscoordint.h"
index d5129f8f65883ed8b6d7fccf5028d1f118a55c40..d977393e33e173a07f55436aefe8c58f62a54b33 100644 (file)
@@ -10,7 +10,7 @@
  * See the COPYING file in the top-level directory.
  */
 
-#include <stdio.h>
+#include "qemu/osdep.h"
 #include "vss-common.h"
 #include "inc/win2003/vscoordint.h"
 #include "inc/win2003/vsprov.h"
index 9b3e3109716fb67938cf1312f3e1dd1992bb5a60..b57d5170e8341ce44a2f78150edfb09f7d013b47 100644 (file)
@@ -10,7 +10,7 @@
  * See the COPYING file in the top-level directory.
  */
 
-#include <stdio.h>
+#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 */
index ad2bf3df61fccd27b2463497912b635549ab1e02..2a39d734a2cde622181d9d418a05d2554628ea19 100644 (file)
@@ -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;
 
This page took 0.030112 seconds and 4 git commands to generate.