Skip to content

Commit 6021c78

Browse files
[libc++][Modules] locale fails to compile with clang modules when _LIBCPP_LOCALE__L_EXTENSIONS is undefined
When `__locale_dir/locale_base_api/locale_guard.h is` compiled independently, as it is when it's in its own clang module, it fails to compile due to `locale_t` being undefined. It needs to include `__locale` to get that, instead of just `clocale`. Reviewed By: ldionne, #libc Differential Revision: https://reviews.llvm.org/D158669
1 parent 13ffde3 commit 6021c78

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libcxx/include/__locale_dir/locale_base_api/locale_guard.h

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define _LIBCPP___LOCALE_LOCALE_BASE_API_LOCALE_GUARD_H
1111

1212
#include <__config>
13+
#include <__locale> // for locale_t
1314
#include <clocale>
1415

1516
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)

0 commit comments

Comments
 (0)