在 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
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public