Skip to content

Commit

Permalink
Fix chrono locale format bug for RHEL gcc (fmtlib#3859)
Browse files Browse the repository at this point in the history
  • Loading branch information
g199209 authored and happymonkey1 committed Apr 6, 2024
1 parent f3e1304 commit 1c9530a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,9 @@ auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale& loc)
if (detail::is_utf8() && loc != get_classic_locale()) {
// char16_t and char32_t codecvts are broken in MSVC (linkage errors) and
// gcc-4.
#if FMT_MSC_VERSION != 0 || \
(defined(__GLIBCXX__) && !defined(_GLIBCXX_USE_DUAL_ABI))
#if FMT_MSC_VERSION != 0 || \
(defined(__GLIBCXX__) && \
(!defined(_GLIBCXX_USE_DUAL_ABI) || _GLIBCXX_USE_DUAL_ABI == 0))
// The _GLIBCXX_USE_DUAL_ABI macro is always defined in libstdc++ from gcc-5
// and newer.
using code_unit = wchar_t;
Expand Down

0 comments on commit 1c9530a

Please sign in to comment.