Fails with single thread
-std:C17 -Tx64-coff -arch:SSE2 -Ot -Ob1 -fp:precise -W2 -Zx
POLINK: error: Unresolved external symbol 'timespec_get'
POLINK: fatal error: 1 unresolved external(s).
It is okay with multi-thread either static -MT or dynamic -MD
-std:C17 -Tx64-coff -arch:SSE2 -MT -Ot -Ob1 -fp:precise -W2 -Zx
-std:C17 -Tx64-coff -arch:SSE2 -MD -Ot -Ob1 -fp:precise -W2 -Zx
The documentation does not mention that multi-threading is required.
Confirmed.
IIRC, timespec_get() started out in threads.h but was at some point, during the development of the C11 standard, moved to time.h. I updated the header files but apparently forgot the multi-threading conditionals in the code.
(observation: this isn't the most used function in the runtime... ;))