Signed-off-by: Angus Salkeld <asalkeld(a)redhat.com>
---
include/qb/qbdefs.h | 4 ----
lib/log.c | 1 +
lib/util_int.h | 8 ++++++++
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/include/qb/qbdefs.h b/include/qb/qbdefs.h
index 25eb1bf..21d3627 100644
--- a/include/qb/qbdefs.h
+++ b/include/qb/qbdefs.h
@@ -79,10 +79,6 @@ extern "C" {
#define typeof __typeof__
#endif /* ANSI */
-#if defined (__GNUC__) && defined (__STRICT_ANSI__)
-#define va_copy(_a, _b) *_a = *_b
-#endif /* ANSI */
-
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
#define QB_GNUC_DEPRECATED \
__attribute__((__deprecated__))
diff --git a/lib/log.c b/lib/log.c
index 0832f4f..d931249 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -32,6 +32,7 @@
#include <qb/qbutil.h>
#include <qb/qbarray.h>
#include "log_int.h"
+#include "util_int.h"
static struct qb_log_target conf[32];
static uint32_t conf_used_max = 0;
diff --git a/lib/util_int.h b/lib/util_int.h
index 1b1169f..b26b79c 100644
--- a/lib/util_int.h
+++ b/lib/util_int.h
@@ -22,6 +22,14 @@
#include <qb/qblog.h>
+#if !defined (va_copy)
+#if defined (__va_copy)
+#define va_copy(_a, _b) __va_copy(_a, _b)
+#else
+#define va_copy(_a, _b) memcpy(&_a, &_b, sizeof(va_list))
+#endif /* !__va_copy */
+#endif /* !va_copy */
+
/**
* This is used internally by libqb.
*
--
1.7.6