aboutsummaryrefslogtreecommitdiff
path: root/wcsmbs
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-01-23 13:59:31 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-05-25 16:43:29 -0300
commita363f7075125fa654342c69331e6c075518ec28c (patch)
tree7481277d71f77b9b66d98b1dba56ab406d324a65 /wcsmbs
parentd2b1af43057c2bde5b180868a67d2b2bc2de95b7 (diff)
downloadglibc-a363f7075125fa654342c69331e6c075518ec28c.zip
glibc-a363f7075125fa654342c69331e6c075518ec28c.tar.gz
glibc-a363f7075125fa654342c69331e6c075518ec28c.tar.bz2
wchar: Define va_list for POSIX (BZ #30035)
This was uncovered by a recent clang change [1]. Different than ISO C, POSIX states that va_list should be exported by wchar.h [2]. Checked on x86_64-linux-gnu and aarch64-linux-gnu. [1] https://reviews.llvm.org/D137268 [2] https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/wchar.h.html
Diffstat (limited to 'wcsmbs')
-rw-r--r--wcsmbs/wchar.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index acc2eb9..d16f2e6 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -37,6 +37,17 @@
#define __need___va_list
#include <stdarg.h>
+#if defined __USE_XOPEN2K || defined __USE_XOPEN2K8
+# ifdef __GNUC__
+# ifndef _VA_LIST_DEFINED
+typedef __gnuc_va_list va_list;
+# define _VA_LIST_DEFINED
+# endif
+# else
+# include <stdarg.h>
+# endif
+#endif
+
#include <bits/wchar.h>
#include <bits/types/wint_t.h>
#include <bits/types/mbstate_t.h>