Skip to content

Commit ebea573

Browse files
authored
Fix chrono locale format bug for RHEL gcc (#3859)
1 parent ddf0b7d commit ebea573

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/fmt/chrono.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,9 @@ auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale& loc)
398398
if (detail::is_utf8() && loc != get_classic_locale()) {
399399
// char16_t and char32_t codecvts are broken in MSVC (linkage errors) and
400400
// gcc-4.
401-
#if FMT_MSC_VERSION != 0 || \
402-
(defined(__GLIBCXX__) && !defined(_GLIBCXX_USE_DUAL_ABI))
401+
#if FMT_MSC_VERSION != 0 || \
402+
(defined(__GLIBCXX__) && \
403+
(!defined(_GLIBCXX_USE_DUAL_ABI) || _GLIBCXX_USE_DUAL_ABI == 0))
403404
// The _GLIBCXX_USE_DUAL_ABI macro is always defined in libstdc++ from gcc-5
404405
// and newer.
405406
using code_unit = wchar_t;

0 commit comments

Comments
 (0)