Skip to content

Commit

Permalink
fix: missing operator<=> definition in pthread.h (required by lib…
Browse files Browse the repository at this point in the history
…std++)
  • Loading branch information
johnyob committed Jul 31, 2024
1 parent 696ecec commit 23b2f2f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions newlib/libc/sys/hermit/include/pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,16 @@ extern "C" {
{
return ((size_t) l.p) == ((size_t) r.p);
}

// Operator to be compatible to libstd++
#if __cplusplus > 201703L
#include <compare>

inline std::strong_ordering operator<=>(pte_handle_t const& l, pte_handle_t const& r)
{
return ((size_t) l.p) <=> ((size_t) r.p);
}
#endif
#endif


Expand Down

0 comments on commit 23b2f2f

Please sign in to comment.