From 2954f70d39198e67ff6a364a4f5c275381af1a75 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Fri, 17 Aug 2012 19:22:43 +0800 Subject: [PATCH] Fix build on Visual C++ -glib/gmarkup.c: Use G_VA_COPY() instead of va_copy() as va_copy() may not be universally available. -gio/gtestdbus.c: Include io.h on Windows for close() --- gio/gtestdbus.c | 3 +++ glib/gmarkup.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c index 197b2d81f..e80c6e177 100644 --- a/gio/gtestdbus.c +++ b/gio/gtestdbus.c @@ -30,6 +30,9 @@ #ifdef HAVE_UNISTD_H #include #endif +#ifdef G_OS_WIN32 +#include +#endif #include diff --git a/glib/gmarkup.c b/glib/gmarkup.c index 4fda725b5..86e60bb4c 100644 --- a/glib/gmarkup.c +++ b/glib/gmarkup.c @@ -2580,7 +2580,7 @@ _g_markup_collect_attributesv (const gchar *element_name, /* Take a copy of the va_list so that we can iterate back over it in case of * errors. */ - va_copy (ap2, ap); + G_VA_COPY (ap2, ap); while (type != G_MARKUP_COLLECT_INVALID) {