[PATCH 2/2] libc/include/time.h: Add TIME_MONOTONIC for C23

Joel Sherrill <[email protected]> Thu, 16 Apr 2026 17:06:22 -0500
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
---
 newlib/libc/include/time.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/newlib/libc/include/time.h b/newlib/libc/include/time.h
index e972bd416..429dd8bd9 100644
--- a/newlib/libc/include/time.h
+++ b/newlib/libc/include/time.h
@@ -63,6 +63,9 @@ time_t	   time (time_t *_timer);
 int        timespec_get(struct timespec *ts, int base);
 #endif
 #if (__ISO_C_VISIBLE >= 2023)
+#define TIME_MONOTONIC 2
+#endif
+#if (__ISO_C_VISIBLE >= 2023)
 int        timespec_getres(struct timespec *ts, int base);
 #endif
 #ifndef _REENT_ONLY
-- 
2.47.3