Skip to content

Commit 23b2f2f

Browse files
committed
fix: missing operator<=> definition in pthread.h (required by libstd++)
1 parent 696ecec commit 23b2f2f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

newlib/libc/sys/hermit/include/pthread.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,16 @@ extern "C" {
10011001
{
10021002
return ((size_t) l.p) == ((size_t) r.p);
10031003
}
1004+
1005+
// Operator to be compatible to libstd++
1006+
#if __cplusplus > 201703L
1007+
#include <compare>
1008+
1009+
inline std::strong_ordering operator<=>(pte_handle_t const& l, pte_handle_t const& r)
1010+
{
1011+
return ((size_t) l.p) <=> ((size_t) r.p);
1012+
}
1013+
#endif
10041014
#endif
10051015

10061016

0 commit comments

Comments
 (0)