Index: libcxx/include/__support/ibm/xlocale.h =================================================================== --- libcxx/include/__support/ibm/xlocale.h +++ libcxx/include/__support/ibm/xlocale.h @@ -107,7 +107,11 @@ va_list ap_copy; // va_copy may not be provided by the C library in C++ 03 mode. #if defined(_LIBCPP_CXX03_LANG) && __has_builtin(__builtin_va_copy) +#if defined(__MVS__) && !defined(_VARARG_EXT_) + __builtin_zos_va_copy(ap_copy, ap); +#else __builtin_va_copy(ap_copy, ap); +#endif #else va_copy(ap_copy, ap); #endif