From 1a14c2e91101b19b9dfd135494d8bcdceba83bce Mon Sep 17 00:00:00 2001 From: Paul Asmuth Date: Wed, 5 Apr 2017 19:28:09 +0200 Subject: [PATCH] fix invalid type error on systems with HAVE_VA_LIST_AS_ARRAY (fixes #336) --- lib/error.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/error.cc b/lib/error.cc index 1aa5ce927f..4821e89d9b 100644 --- a/lib/error.cc +++ b/lib/error.cc @@ -726,7 +726,11 @@ ErrorHandler::vxformat(int default_flags, const char *s, va_list val) s = s2 + 1; for (Conversion *item = error_items; item; item = item->next) if (item->name.equals(s1, s2 - s1)) { +#ifdef HAVE_VA_LIST_AS_ARRAY + strstore = item->hook(flags, (va_list*) VA_LIST_REF(val)); +#else strstore = item->hook(flags, VA_LIST_REF(val)); +#endif s1 = strstore.begin(); s2 = strstore.end(); goto got_result;