Skip to content

Commit bc641f8

Browse files
ldionneyuxuanchen1997
authored andcommitted
[libc++] Add missing xlocale.h include on Apple and FreeBSD (#99689)
Summary: The `<locale>` header uses `strtoll_l` and friends which are defined in `<xlocale.h>` on these platforms. While this works via transitive includes when modules are disabled, this doesn't work anymore if the platforms are modularized properly. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250520
1 parent a98cbe7 commit bc641f8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libcxx/include/locale

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ template <class charT> class messages_byname;
232232
# include <__locale_dir/locale_base_api/bsd_locale_fallbacks.h>
233233
# endif
234234

235+
# if defined(__APPLE__) || defined(__FreeBSD__)
236+
# include <xlocale.h>
237+
# endif
238+
235239
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
236240
# pragma GCC system_header
237241
# endif

0 commit comments

Comments
 (0)