summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAliaksey Kandratsenka <alk@tut.by>2015-05-09 15:38:12 -0700
committerAliaksey Kandratsenka <alk@tut.by>2015-05-09 15:38:12 -0700
commit64d1a86cb8da245c982d470a7dfdd635197e6e5e (patch)
tree57d9ddf28a9aa68f68904beb1ce1082212d2ee9f
parent7013b219970a329d1db58fbd7fa7c907bec8dbba (diff)
downloadgperftools-64d1a86cb8da245c982d470a7dfdd635197e6e5e.tar.gz
include time.h for struct timespec on Visual Studio 2015
This patch was submitted by user wmamrak.
-rw-r--r--src/windows/port.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/windows/port.h b/src/windows/port.h
index 0af6ea7..0350f45 100644
--- a/src/windows/port.h
+++ b/src/windows/port.h
@@ -64,6 +64,11 @@
#include <assert.h>
#include <stdlib.h> /* for rand, srand, _strtoxxx */
+#if _MSC_VER >= 1900
+#define _TIMESPEC_DEFINED
+#include <time.h>
+#endif
+
/*
* 4018: signed/unsigned mismatch is common (and ok for signed_i < unsigned_i)
* 4244: otherwise we get problems when subtracting two size_t's to an int