Fix compilation using MinGW-W64 13 and later #364
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Version 13 of MinGW-W64 changed the declaration of
clock_gettime()inpthread_time.hto a function definition which calls eitherclock_gettime32()orclock_gettime64(), see https://github.com/mingw-w64/mingw-w64/blob/v13.x/mingw-w64-libraries/winpthreads/include/pthread_time.h. This conflicts with check's definition ofclock_gettime()inclock_gettime.c. In order to prevent this, we can defineWIN_PTHREADS_TIME_Hinlibcompat.hto prevent the contents ofpthread_time.hfrom being included.