Skip to content

Commit a55df23

Browse files
authored
[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.
1 parent c194bc7 commit a55df23

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)