Skip to content

Commit ec17a7a

Browse files
ldionnetru
authored andcommitted
[libc++] Add missing xlocale.h include on Apple and FreeBSD (llvm#99689)
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. (cherry picked from commit a55df23)
1 parent d767c52 commit ec17a7a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libcxx/include/locale

+4
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)