浏览代码

Merge pull request #216 from kainjow/patch-1

Fix redefinition of timespec in VS2015
bel2125 9 年之前
父节点
当前提交
baee5d3ddc
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/civetweb.c

+ 3 - 0
src/civetweb.c

@@ -320,6 +320,9 @@ typedef DWORD clockid_t;
 #define CLOCK_REALTIME (2)
 #endif
 
+#if defined(_MSC_VER) && (_MSC_VER >= 1900)
+#define _TIMESPEC_DEFINED
+#endif
 #ifndef _TIMESPEC_DEFINED
 struct timespec {
 	time_t tv_sec; /* seconds */