Skip to content

Commit

Permalink
Fix build on Windows (Visual Studio 2015)
Browse files Browse the repository at this point in the history
This solves elad#110.

It's similar to this issue on node-canvas: Automattic/node-canvas#605

Basically, Visual Studio didn't have snprintf, so it had to be polyfilled, like it has been done here. But now, in 2015, snprintf was finally implemented, which leads to it being defined twice.
This change lets me compile the project on Windows 7 x64, with Visual Studio 2015.
  • Loading branch information
eirslett authored and horiuchi committed May 19, 2016
1 parent e08633e commit a99def5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/imagemagick.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define BUILDING_NODE_EXTENSION
#endif // BUILDING_NODE_EXTENSION

#if _MSC_VER
#if _MSC_VER && _MSC_VER < 1900
#define snprintf _snprintf
#endif

Expand Down

0 comments on commit a99def5

Please sign in to comment.