I think `"pthread_time.h"` makes more sense when including headers from the source tree?
________________________________ From: LIU Hao Sent: Friday, January 31, 2025 3:57 PM To: Kirill Makurin; mingw-w64-public@lists.sourceforge.net Subject: Re: [Mingw-w64-public] winpthreads and MSVC 在 2025-01-31 14:48, Kirill Makurin 写道: > I assume `getntptimeofday` is provided by mingw-w64 runtime. Maybe author of > the test did not want > to use winpthreads' `clock_gettime` for the test? > > Anyway, I attached a patch which replaces calls to `getntptimeofday` with > calls to `clock_gettime`. > I think the only downside of using `clock_gettime` is that if it somehow > breaks, it will also make > this test to fail. It's unlikely, but indeed this makes sense. > diff --git a/mingw-w64-libraries/winpthreads/tests/t_nanosleep.c > b/mingw-w64-libraries/winpthreads/tests/t_nanosleep.c > index 21c0ceb8d..c876dc7b0 100644 > --- a/mingw-w64-libraries/winpthreads/tests/t_nanosleep.c > +++ b/mingw-w64-libraries/winpthreads/tests/t_nanosleep.c > @@ -2,14 +2,13 @@ > #include <stdio.h> > #include <stdlib.h> > #include <time.h> > +#include "pthread_time.h" Maybe this should be `<pthread_time.h>` ? -- Best regards, LIU Hao _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public