Skip to content

Commit d92f93f

Browse files
jeffhostetlerdscho
authored andcommitted
msvc: do not re-declare the timespec struct
VS2015's headers already declare that struct. Signed-off-by: Jeff Hostetler <[email protected]>
1 parent eddb504 commit d92f93f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compat/mingw.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,13 @@ static inline long long filetime_to_hnsec(const FILETIME *ft)
394394
#ifndef __MINGW64_VERSION_MAJOR
395395
#define off_t off64_t
396396
#define lseek _lseeki64
397+
#ifndef _MSC_VER
397398
struct timespec {
398399
time_t tv_sec;
399400
long tv_nsec;
400401
};
401402
#endif
403+
#endif
402404

403405
static inline void filetime_to_timespec(const FILETIME *ft, struct timespec *ts)
404406
{

0 commit comments

Comments
 (0)