Skip to content

Commit 2641da8

Browse files
ian-twilightcodertru
authored andcommitted
[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 (cherry picked from commit 6021c78)
1 parent 4114813 commit 2641da8

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

Lines changed: 1 addition & 0 deletions
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)