HushengGen / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

msvc14 (visual studio 15) timespec type redefinition #686

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Compile TCMalloc using Visual Studio 15
2. Check the compiler ouput

What is the expected output? What do you see instead?
There should be no errors. There are C2011 erorrs instead.

What version of the product are you using? On what operating system?
Windows 7, msvc14

Please provide any additional information below.

Quick fix is to add these few lines of code somewhere top in src/windows/port.h:

#if _MSC_VER >= 1900
#define _TIMESPEC_DEFINED
#include <time.h>
#endif

Original issue reported on code.google.com by wmam...@gmail.com on 6 May 2015 at 11:58

GoogleCodeExporter commented 9 years ago
Applied. Thanks.

Original comment by alkondratenko on 9 May 2015 at 10:42