We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c52dcf9 commit aa6386eCopy full SHA for aa6386e
1 file changed
quant.h
@@ -144,9 +144,9 @@ typedef volatile long atomic_int;
144
#ifndef CLOCK_MONOTONIC
145
#define CLOCK_MONOTONIC 1
146
#endif
147
-#if !defined(_TIMESPEC_DEFINED) && !defined(__struct_timespec_defined)
148
-#define _TIMESPEC_DEFINED 1
149
-#define __struct_timespec_defined 1
+/* timespec: MSVC 2022+ defines it in time.h, older MSVC doesn't.
+ * Only define if not already available. */
+#if !defined(_TIMESPEC_DEFINED) && !defined(__struct_timespec_defined) && !defined(_INC_TIME)
150
struct timespec { long tv_sec; long tv_nsec; };
151
152
static inline int clock_gettime(int id, struct timespec* ts) {
0 commit comments