From a0e54bb0b82fba8ab740e5aa2493931604392b60 Mon Sep 17 00:00:00 2001
From: deve <deveee@gmail.com>
Date: Thu, 6 Aug 2015 10:00:08 +0200
Subject: [PATCH] Avoid timespec structure redeclaration on VS2015.

Still seems to be a bit messy, because in newer pthread header (gcc 5.1) I see _TIMESPEC_DEFINED instead of HAVE_STRUCT_TIMESPEC. But it should work with our dependencies files.

And still wiiuse library needs to be recompiled to make it working with VS2015.
---
 CMakeLists.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7228f719c..e209fc4ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -211,6 +211,11 @@ if(WIN32)
 
     # And shut up about unsafe stuff
     add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+
+    # Avoid timespec structure redeclaration on Visual Studio 2015
+    if (MSVC_VERSION EQUAL 1900)
+        add_definitions(-DHAVE_STRUCT_TIMESPEC)
+    endif()
 endif()
 
 if(MSVC)