libCom/osi: fix timespec definition for MinGW

This commit is contained in:
Ralph Lange
2016-01-13 17:28:23 +01:00
parent 77a5f0db77
commit 45c8a173f3

View File

@@ -16,11 +16,17 @@
#ifndef INC_osdTime_H
#define INC_osdTime_H
/* MinGW only has a snippet time.h not protected against multiple inclusion */
#if defined(__struct_timespec_defined)
#define _TIMESPEC_DEFINED 1
#endif
#if ! defined(_MINGW) || ! defined(_TIMESPEC_DEFINED)
# if _MSC_VER >= 1900
# include <time.h>
# else
#define __struct_timespec_defined 1
#define _TIMESPEC_DEFINED 1
struct timespec {
time_t tv_sec; /* seconds since some epoch */