diff --git a/include/time.h b/include/time.h index 26e208ffa65b..cec901a1e8ba 100644 --- a/include/time.h +++ b/include/time.h @@ -207,9 +207,13 @@ time_t posix2time(time_t t); #include #endif +#if defined(__BSD_VISIBLE) || __ISO_C_VISIBLE >= 2011 || \ + (defined(cplusplus) && cplusplus >= 201703) +#include /* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */ #define TIME_UTC 1 /* time elapsed since epoch */ int timespec_get(struct timespec *ts, int base); +#endif __END_DECLS