Skip to content

Commit a9f87e9

Browse files
committed
[libc++] Add "using-if-exists" to timespec_get in modules
Picolibc does not provide timespec_get function. Adding "using-if-exists" attribute fixes the modules.
1 parent aa4547f commit a9f87e9

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

libcxx/modules/std.compat/ctime.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ export {
2424
using ::mktime;
2525
using ::strftime;
2626
using ::time;
27-
using ::timespec_get;
27+
using ::timespec_get _LIBCPP_USING_IF_EXISTS;
2828
} // export

libcxx/modules/std/ctime.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ export namespace std {
2424
using std::mktime;
2525
using std::strftime;
2626
using std::time;
27-
using std::timespec_get;
27+
using std::timespec_get _LIBCPP_USING_IF_EXISTS;
2828
} // namespace std

libcxx/test/std/modules/std.compat.pass.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212

1313
// XFAIL: has-no-cxx-module-support
1414

15-
// picolibc does not provide the required timespec_get function, and the
16-
// "using-if-exists" mechanism apparently did not work here.
17-
// XFAIL: LIBCXX-PICOLIBC-FIXME
18-
1915
// A minimal test to validate import works.
2016

2117
// MODULE_DEPENDENCIES: std.compat

0 commit comments

Comments
 (0)